Giter Club home page Giter Club logo

midiplayer's Introduction

Hi, I'm Nico ๐Ÿ‘‹

I'm currently learning about audio programming and artificial intelligence.

midiplayer's People

Contributors

nberr avatar

Stargazers

 avatar  avatar

Watchers

 avatar

midiplayer's Issues

Sound is cut at the end

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
Screen Shot 2022-12-14 at 9 48 10 AM

In here you will hear the note being cut at the end

2 - Add a note that takes the whole bar's space
Screen Shot 2022-12-14 at 9 48 17 AM

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.

The "open" window stays in front even when switching to another app

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

Random file loading order

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

Weird behavior when pressing the keys multiple times

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

Recalculate MIDI files when bpm changes

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

MIDI recording to track

Issue

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.

  1. Press and release a key -> the entire MIDI file is written to the track. This occurs because we swap the entire MIDI buffer once the key is triggered (we aren't actually writing the notes as time goes on)
  2. Pressing multiple keys -> the entire MIDI file is written to the track overlapping with itself. This occurs for the same reason above.

Possible Solution

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.

Text on the overlay is acting weird

This is more visible on the L letters.
Maybe I need to make the text a bit bolder or this is a pixel alignment issue that I need to check
Kapture 2022-12-12 at 23 30 21

New .mid file not recognized when clicking Previous/Next

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?

File with silence at the end plays fine. File with a perfect loop = not in sync with project's tempo

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

Plugin state retention

The plugin should retain it's state when closed

Things that should be saved

  • current MIDI file loaded
  • path to files
  • left and right arrow functionality

Not working after Bounce in Place / Bounce project

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.

File with multiple tracks don't work

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

Playback with different buffer sizes

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.

MIDI transposition

Sometimes the midi messages are transposed. not sure why this occurs.

Strict the play to when the note is being held down

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.

Notes keep playing after plugin is muted/disabled

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

Hanging notes occur in the following places:

  • when loading the plugin (on occasion)
  • when stoping a MIDI file
  • when loading a new MIDI file while a file is playing

Playback not in sync

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 :)

The text is being compressed

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:
image

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

Popping/Clicking when changing BPM

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.