Page 1 of 1

how to make a mp3 file from the output of my morse code program?

Posted: Thu Jun 05, 2025 7:30 am
by wimapon3
I made a program that make morse code sounds... and sends an certain text to the loudspeaker of the computer.

i like to put this signals into a mp3 file , so i can send it by mail to other persons ( who likes to learn morse code)

Wim

Re: how to make a mp3 file from the output of my morse code program?

Posted: Thu Jun 05, 2025 8:09 am
by Marc56us
wimapon3 wrote: Thu Jun 05, 2025 7:30 am I made a program that make morse code sounds... and sends an certain text to the loudspeaker of the computer.
i like to put this signals into a mp3 file , so i can send it by mail to other persons ( who likes to learn morse code)
PB can play mp3 files (with LoadMovies lib) , but cannot create them (as far as I know).

Re: how to make a mp3 file from the output of my morse code program?

Posted: Thu Jun 05, 2025 12:00 pm
by Seymour Clufley
You would probably need to use a utility like SoX or FFMPEG. I wrote a library for using SoX with PB.

Re: how to make a mp3 file from the output of my morse code program?

Posted: Thu Jun 05, 2025 12:08 pm
by idle
wouldn't it be easier to compile the program and have it load a text file?
Though you could always use a program like Audacity to record the playback and export as mp3

Re: how to make a mp3 file from the output of my morse code program?

Posted: Thu Jun 05, 2025 6:52 pm
by infratec
An other idea ... MIDI

The files will be smaller than mp3
I will think about how to create morse MIDI files.

Re: how to make a mp3 file from the output of my morse code program?

Posted: Thu Jul 24, 2025 10:04 am
by Mitchelly
wimapon3 wrote: Thu Jun 05, 2025 7:30 am I made a program that make morse code sounds... and sends an certain text to the loudspeaker of the computer.

i like to put this signals into a mp3 file , so i can send it by mail to other persons ( who likes to learn morse code)
snow road
Wim
Is there any way to combine using SoX or FFMPEG with the program's source code to automate the mp3 creation process?

Re: how to make a mp3 file from the output of my morse code program?

Posted: Thu Jul 24, 2025 10:54 am
by infratec
As written:

for morse code all waveform storing makes no sense. It is always larger as the corresponding midi file.

idle implemented my midi version in one of his morse codes :mrgreen:
viewtopic.php?t=87109

And of course, with RunProgram() and the right program you can convert everything to mp3.

Re: how to make a mp3 file from the output of my morse code program?

Posted: Thu Jul 24, 2025 11:10 pm
by idle
infratec wrote: Thu Jul 24, 2025 10:54 am As written:

for morse code all waveform storing makes no sense. It is always larger as the corresponding midi file.

idle implemented my midi version in one of his morse codes :mrgreen:
viewtopic.php?t=87109

And of course, with RunProgram() and the right program you can convert everything to mp3.
I also changed from beep using your wav generation / catchsound tip as I couldn't record the beep as its generated out of process.
it can now encode, play and record the audio to decode via gortezl filter as well as plain text/morse encode decode
The audio decoding needs a bit more work though that's a case of dynamic timing on and off

Re: how to make a mp3 file from the output of my morse code program?

Posted: Fri Jul 25, 2025 5:43 am
by wilbert
If you do want mp3 output for morse, I guess it should also be possible to have the mp3 data for a dot and the mp3 data for a dash and just chain them all together in the right way. :idea: