I'm currently learning about audio programming and artificial intelligence.
nberr / midiplayer Goto Github PK
View Code? Open in Web Editor NEWMidi Playback audio plugin
License: GNU General Public License v3.0
Midi Playback audio plugin
License: GNU General Public License v3.0
Using both files inside /Dropbox/SPITE - Audio Tools/SPITE MIDI/MIDI Files for Tests/_Not in sync
I get the same results:
The very last note gets cut, as if someone pressed mute right after the last note starts playing.
2 tests using a 1 bar/4 beats loop, for now just using the "Danny Wyatt 120 bpm" to make it in sync with the project:
1 - Add a single note at beat 1, so it will trigger the plugin as a one-shot type of thing
In here you will hear the note being cut at the end
2 - Add a note that takes the whole bar's space
In here the loop will start over where the last note is cut and it creates a non-loop cycle, while duplicating the file so you start hearing 2 notes playing against each other.
It seems that the plugin is only taking into account the space taken by the notes and not the .mid file's length itself so if the last note ends at beat 2.5, but the original loop was 4 beats long, the plugin seems to be using 2.5 as the end of the loop, instead of the end of beat 4.
I created the file "Danny Wyatt cut" (you will see the image there) and I get the exact same results so it seems the issue is exactly that. The plugin is not gathering some info from the MIDI file that specifies the length of the whole section.
Can we make it that the open/load window is only visible while Logic is the front app?
I have other apps that insist on doing the same thing and I find it so "annoying", because if I just want to really check something on another app, but I don't want to close the "open" window in Logic, I can't
I have 7 files, all named in sequence:
1.mid
2.mid
3.mid
4.mid
5.mid
6.mid
7.mid
I loaded 1.mid and when I pressed Next, it loaded 3.mid, then 2.mid, then 6.mid, 7.mid, 5.mid, 4.mid
I pressed a key once, it stated playing. The after that, while still playing, I started hitting the same note repeatedly. It started acting weird. I believe once we make it only play when there's a key down/note in the DAW, this will go away, but I'm just leaving this here for reference in the future so we can re-test this
Users should be able to change the bpm and the MIDI file should update to reflect that change automatically i.e. without the user having to reload the files
In logic, there's a setting called "Record MIDI to track here". Using this allows the user to record the MIDI output from the plugin into a track. Here are two issues related to this.
Might need to switch back to the old system of breaking up the midi sequence into different parts. The solution will be similar to writing an arpeggiator. This would ensure that the only data written to the track is the data up to n samples where n is the amount of time passed since pressing a key.
So I have the 1-7 files and a bunch of other ones. The first time I load for example 1.mid and I hit next, it goes to 2.mid, 3, 4, etc...
When I close the window and open it again, it gets all crazy again.
The plugin crashes if the host is playing
I had the list of the 1-7 files. Then I had to update the 4.mid file and named the new file 4.2.mid it didn't recognize when I clicked the arrows. I had to load any of the other files first in order for it to "refresh". Is it possible to re-check when clicking the arrows to avoid this?
If you import the 4.mid file into Logic, you will see that for some reason there's an empty bar after the notes.
If I import that one, the notes play in sync with the project.
Since I want to loop it, I edited the file to only take 2 bars, so no empty space at the end.
If I import that edited file to Logic (4-3.mid), it's a perfect loop and it plays as such.
If I load it with the plugin and hit a note, it's out of sync
The plugin should retain it's state when closed
Things that should be saved
When I tried to bounce in place to convert it to an audio region inside the project, not only it didn't print the notes, but the plugin stopped working completely. I had to reload the file to make it work again.
The same thing happened when I bounced the project itself as a new audio file, like wav/mp3, etc.
For example the file BachJS - BWV861_Praeludium16
If you open it with Logic you will see that there's more than 1 tracks that get loaded (3 to be precise). We should check how this works.
Also, I then selected one of those 3 (I picked the one at the bottom), exported it as a new .mid file, tried to play it, no luck.
It seems that there's something happening with that kind of MIDI file, even when exporting one of the tracks individually.
Check the folder "MULTI" inside Dropbox > SPITE MIDI > MIDI Files for Tests.
One is the original files with 3 "tracks".
One is just one of them exported as individual MIDI file
Sometimes the playback is too fast. I think this is due to the buffer size. currently I'm using getBlockSize()
which doesn't seem to be returning the same value as the buffer size in the host DAW. Additionally, the block/buffer size isn't guaranteed to be the same each time. Maybe this calculation needs to occur in the processBlock
function.
That's pretty much what's happening. Bouncing in place doesn't print the notes to audio. It seems that it's sending the notes to the sequencer, but only for playback purposes
I will just leave it here as a note to see if we can fix this without the installer
I pressed a key on my keyboard, no sound. I thought it wasn't playing. I was doing something else and suddenly it started playing, but it only played once.
Sometimes the midi messages are transposed. not sure why this occurs.
The plugin is supposed to be used almost like a loop player, but with MIDI, so it makes more sense that it only plays if the keyboard key is being pressed (so it stops playing when the key is released) or the MIDI note in the DAW is present so if the MIDI file is 2 bars long, but the MIDI note is only 1 bar long, it will only play for 1 bar.
When a new file is loaded, the current file should stop
The plugin crashes when playing a note before loading a file
By coincidence when I was about to disable the plugin the notes started playing (after those 30 seconds or so), but when I disabled it, the song still played, even with the plugin disabled.
I don't know if this is an issue with the plugin or not, because I was testing it on a new template I have and that's quite heavy so it could be latency. I was having a similar issue a few days ago where I would stop the playhead and the MIDI notes would still play like 1 second after I stopped.
But this happened, just in case you want to check if it's the plugin or maybe my template.
EDIT: I tried it again with the default Empty Project, which doesn't introduce any latency. The MIDI was playing and I hit the button to disable the plugin. The notes kept playing. And it took probably 1 minute from the moment I hit the key and the moment I heard any sound.
Hanging notes occur in the following places:
Inside /Dropbox/SPITE - Audio Tools/SPITE MIDI/MIDI Files for Tests/_Not in sync
there's a file called "Danny Wyatt Dec 14". Open it with the plugin and also add it to LOGIC by dragging and dropping it.
Turn the metronome on and test them.
The one from the plugin is not in sync, whereas the other one is.
And here's what looking at your code made me think, even though I have no clue what I was looking at:
At one point on one of the bugs you fixed, I noticed that there's a calculation that uses something like 120*
So I guess that calculation is messing with the sync and here's why:
On that same folder there's the other file "Danny Wyatt 120 bpm".
This one was exported with the project at 120 bpm (which matches the number you used for that calculation).
The first one was exported with the project set to 128 bpm and I believe that's causing the issue with your calculation.
So my guess is that instead of using 120* you probably need to create a variable that is set based on the project's tempo so when we export a file, which probably contains tempo information, the plugin will do the math properly.
This is just a thought and I think it might be the issue here. If not, at least you know that files exported at 120 play in sync, everything else doesn't.
And maybe this can also be somehow connected with other issues? I will let you test it :)
need to check if all the midi data is loaded properly for long files
The text with the file name, when it's a long name, is being compressed.
On the right hand side, give the text field name the same margin to the edge of the darker box (the background) as the distance between the text and the arrow when they are not hovered over, like this:
My idea for this is that the text uses that whole space and if it's longer than that, it can show the beginning of the name, the end, and then the middle gets converted to ...
I believe that's called "truncate" the text, right?
So a name like
SPITE MIDI - Front Panel - Button - Folder
Would be something like
SPITE MIDI - F...button - Folder
to use the whole space available shown in the image above
Just like the other issue with the mute/disable, in this case I removed the plugin completely and it still played the notes
If a file is playing and I hit my keyboard keys or a MIDI note in the DAW gets played, it should stop the current play and restart
Most likely due to the processing that is done on the audio thread. this is unavoidable. a better solution may be to skip processing for x amount of time when the bpm changes instead of every time the bpm changes
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.