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
how to make a mp3 file from the output of my morse code program?
Re: how to make a mp3 file from the output of my morse code program?
PB can play mp3 files (with LoadMovies lib) , but cannot create them (as far as I know).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)
-
- Addict
- Posts: 1265
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
Re: how to make a mp3 file from the output of my morse code program?
You would probably need to use a utility like SoX or FFMPEG. I wrote a library for using SoX with PB.
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
Re: how to make a mp3 file from the output of my morse code program?
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
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?
An other idea ... MIDI
The files will be smaller than mp3
I will think about how to create morse MIDI files.
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?
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?
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
viewtopic.php?t=87109
And of course, with RunProgram() and the right program you can convert everything to mp3.
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

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?
I also changed from beep using your wav generation / catchsound tip as I couldn't record the beep as its generated out of process.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![]()
viewtopic.php?t=87109
And of course, with RunProgram() and the right program you can convert everything to mp3.
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?
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. 

Windows (x64)
Raspberry Pi OS (Arm64)
Raspberry Pi OS (Arm64)