First off I just want to apologize if this is the wrong section.
So Basically I am trying to create music encoded from written text using MIDI files as they can range from 0-127 degrees meaning that I have a range of 128 characters.
However the issue I am running into is decoding this music back into text but more specifically is getting an accurate range of notes that I have used to produce the midi file.
I am using the python plugin MIDIUtil (as you can write the midi file in a series of notes - 50,60,70,20 ect which is the easiest way to convert the string of text into music running a python replace script. eg. "The boy was on the swing" becomes "46,08,05,00,02,15,25,00,23,01,19,00,15,14,00,20,08,05,00,19,23,09,08,07"
) to create the midi file and am then using ffmpeg to convert it into an mp3 file and the python plugin AudioSegment to further convert this into a wav
the reason for converting the audio into an mp3 and then a wav, is that I would hope the project could be used to send the music in a different number of ways, from a simple voice message to using a CB Radio. meaning that the audio file is not actually being transferred in the modern since but transmitted or broadcast and received which doesn't use an audio format
I am then using sonic visualiser with the polyphonic Transcription [university of alcante] Transform as it does a good job of picking out the exact midi notes that went into compiling the audio which will let me reverse replace the numbers with characters to turn the music back into the correct string of text.
(one test I ran using 99 notes shuffled into a random order had just 4 errors so you could say the best result I got was 95% accurate, however that was just one of multiple tests.) but the process is not 100% accurate and I believe the reason for this is that the length of tones used in the MIDI file vary depending on pitch and that there is not a solid audio gap between each note played. - think of the way low notes on a piano linger longer than the high notes.
there also seems to be an issue when jumping from certain frequency's to another frequency that sonic visualiser will miss read these two notes as one note of an intermediate pitch but i suspect this is down to the varying length depending on the note (a low note plays longer than a high note) and also a lack of an audio gap between the notes
So far I have tried running the midi file through MuseScore3 to alter the sound into something more reliable for decryption but cant find any suitable sounds.
Does anybody have any suggestions as to producing short crisp notes for a midi file where all the notes regardless of tone would play for the same duration and a way to add a fixed audio gap between the notes in order to allow for pitch perfect reading in audio visualiser.
So Basically I am trying to create music encoded from written text using MIDI files as they can range from 0-127 degrees meaning that I have a range of 128 characters.
However the issue I am running into is decoding this music back into text but more specifically is getting an accurate range of notes that I have used to produce the midi file.
I am using the python plugin MIDIUtil (as you can write the midi file in a series of notes - 50,60,70,20 ect which is the easiest way to convert the string of text into music running a python replace script. eg. "The boy was on the swing" becomes "46,08,05,00,02,15,25,00,23,01,19,00,15,14,00,20,08,05,00,19,23,09,08,07"
) to create the midi file and am then using ffmpeg to convert it into an mp3 file and the python plugin AudioSegment to further convert this into a wav
the reason for converting the audio into an mp3 and then a wav, is that I would hope the project could be used to send the music in a different number of ways, from a simple voice message to using a CB Radio. meaning that the audio file is not actually being transferred in the modern since but transmitted or broadcast and received which doesn't use an audio format
I am then using sonic visualiser with the polyphonic Transcription [university of alcante] Transform as it does a good job of picking out the exact midi notes that went into compiling the audio which will let me reverse replace the numbers with characters to turn the music back into the correct string of text.
(one test I ran using 99 notes shuffled into a random order had just 4 errors so you could say the best result I got was 95% accurate, however that was just one of multiple tests.) but the process is not 100% accurate and I believe the reason for this is that the length of tones used in the MIDI file vary depending on pitch and that there is not a solid audio gap between each note played. - think of the way low notes on a piano linger longer than the high notes.
there also seems to be an issue when jumping from certain frequency's to another frequency that sonic visualiser will miss read these two notes as one note of an intermediate pitch but i suspect this is down to the varying length depending on the note (a low note plays longer than a high note) and also a lack of an audio gap between the notes
So far I have tried running the midi file through MuseScore3 to alter the sound into something more reliable for decryption but cant find any suitable sounds.
Does anybody have any suggestions as to producing short crisp notes for a midi file where all the notes regardless of tone would play for the same duration and a way to add a fixed audio gap between the notes in order to allow for pitch perfect reading in audio visualiser.