News:

See you space cowboy...

Main Menu

NSM Sound Utilities [April 2, 2017]

Started by PetrifiedLasagna, June 09, 2016, 10:03:05 PM

Previous topic - Next topic

PetrifiedLasagna

Quote from: NocturneOfShadow on June 14, 2016, 12:21:20 PMmaybe now is a good time for a break.  Look at it with fresh eyes :P

Yeah, it has been a while since I have transcribed... or done anything else productive!
I will take a look at this again in a few days to a week and see if something comes up.

PetrifiedLasagna

I have been looking around at documentation, and the Web Audio API defines all sorts of cool audio effects that work together like a synthesizer. There is even one to perform filtering which from my understanding can be used as an equalizer. I will leave the link below so you guys can check out the different nodes (each one has a description below it). Although, I know for a fact that I will not be using the delay node, or the periodic wave node.

https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API#Defining_audio_effects_filters

I am also going to try out an algorithm which I should have better results.

PetrifiedLasagna

Okay, I just got Virtuoso up off of the ground. Boy, did I forget that midi files can be a pain to work with! I got the loading part out of the way though. I have a little request of you guys to make sure that it responds correctly: Take whatever midi files you have and see if it loads without any errors. You can see if it had a problem by scrolling to the bottom and looking for red highlighted text. In fact, take files that are corrupt or that you modified to see if it throws an appropriate error.  ;)

E. Gadd Industries

I will definitely try it when I get back from vacation
"Everyone is crazy but me"
-The Sign Painter


The entrance to my lab is hidden... somewhere...
Spoiler

[/spoiler
[close]

PetrifiedLasagna

Hey everybody, while I was looking at midi documentation I found a couple of interesting alternatives that you may want to try out while I am getting the engine for virtuoso setup. I personally thought that Euphony was really cool, but that's just my inner engineer speaking :D

I did notice that both have some framerate issues (especially with Euphony), which I will do my best to avoid with virtuoso. Although, I did not try VexFlow since I was too lazy to make an account

http://qiao.github.io/euphony/#15 (Euphony: 3D piano)
http://galacticmilk.com/piano/ (Color Piano)
http://my.vexflow.com/ (VexFlow)

PetrifiedLasagna

I have an update out for Virtuoso. It has really come a long way, and can now play midi files as well as graphically show which keys are being pressed. I even made a little video to showcase the application.

Although, I had a bit of a mishap when I was first setting up the engine. To put it shortly, let's just say that a full amplitude, 3000 hz (high pitched) tone with headphones on is not something you want to experience  :'(
I immediately connected all outputted notes to a gain node after that!


Maelstrom

Nice!
One problem I found:
It glitches out playbackwaise in Google Chrome when it's not in the current tab.

Edit: and there's no way to tell just by looking at it that a note is repeated instead of just held.

E. Gadd Industries

So I tried the Live Demo of Virtuoso. I loaded several different MIDI files, and pressed play, and I waited. Pressed play again. Waited some more. None of them worked. I'm using IE though. I opened up the HTML through "Inspect Element" & I saw Firefox, Safari, and a few others I forgot. Does it only work on those?
"Everyone is crazy but me"
-The Sign Painter


The entrance to my lab is hidden... somewhere...
Spoiler

[/spoiler
[close]

PetrifiedLasagna

Quote from: E. Gadd Industries on June 30, 2016, 03:57:36 PMSo I tried the Live Demo of Virtuoso. I loaded several different MIDI files, and pressed play, and I waited. Pressed play again. Waited some more. None of them worked. I'm using IE though. I opened up the HTML through "Inspect Element" & I saw Firefox, Safari, and a few others I forgot. Does it only work on those?

Support for anything with IE is dodgy at best. If you want to stick with that browser line, I would try Microsoft Edge although that is Windows 10 only  :-\

It does work with Edge though, although even that seems to be garbage compared to other browsers. I just had to fix some code, because it didn't like the syntax which was valid JavaScript!

Below is an image showing the support of the Web Audio API by different browsers at the time of writing (notice IE does not support).

Onionleaf

This look pretty cool! It was able to play back the majority of my MIDIs that I uploaded, but would sometimes stop partway (which might have something to do with my connection). It would be nice to see some sort of status text which would say if the file has uploaded correctly or not, and if the MIDI track is in the process of being loaded/transformed/etc. Plus some of the MIDIs would result in one note being held nonstop, eventually causing the whole playback to kinda slow down and malfunction... but I'm sure you'll find fixes for everything eventually, you seem to know what you're doing. :)

PetrifiedLasagna

Quote from: Onionleaf on July 01, 2016, 04:34:43 AMThis look pretty cool! It was able to play back the majority of my MIDIs that I uploaded, but would sometimes stop partway (which might have something to do with my connection). It would be nice to see some sort of status text which would say if the file has uploaded correctly or not, and if the MIDI track is in the process of being loaded/transformed/etc.

This actually does not connect to the internet. Everything is local, so you could even run this offline if you downloaded the page and scripts. Although, I will implement some kind of message box that will appear while the midi is being processed.

Quote from: Onionleaf on July 01, 2016, 04:34:43 AMPlus some of the MIDIs would result in one note being held nonstop, eventually causing the whole playback to kinda slow down and malfunction... but I'm sure you'll find fixes for everything eventually, you seem to know what you're doing. :)

Would you like to send me the midis that are having problems? That way I can better figure out what is causing the problem. I have a hunch on what might be causing it though.

PetrifiedLasagna

Hey guys. This next update is going to be big, I just wanted to fix one thing before releasing. You are all probably aware that the sample being used is not exactly pleasant. So I wanted to ask if anyone with a piano could record a treble A note being played at an average intensity.

Why A? Well, the frequency formula I am using is based on the frequency of said note.
Any sounds will be appreciated. :)

E. Gadd Industries

Well, I just tried out Virtuoso. I put in Gourmet Race, and it started off really slowly, and as the song progressed, it sped up a little bit, but not fully. It also lagged a lot. But then again, it is Gourmet Race XD
"Everyone is crazy but me"
-The Sign Painter


The entrance to my lab is hidden... somewhere...
Spoiler

[/spoiler
[close]

PetrifiedLasagna

Wow, it has been a while. There is now a new update of virtuoso out for you guys to try. One of the cool things is now you no longer have to listen to the horrible sound of a square wave (when online). Of course, in order to avoid getting sued, I had to create my own sample for the sound effect and the best I could get was something along the lines of an old style electric-piano.

Special thanks to Onionleaf for providing me with some midis to help me fix some troubling bugs.

Quote from: E. Gadd Industries on July 25, 2016, 05:53:44 AMWell, I just tried out Virtuoso. I put in Gourmet Race, and it started off really slowly, and as the song progressed, it sped up a little bit, but not fully. It also lagged a lot. But then again, it is Gourmet Race XD

I am listening to this as I am typing and it is running at the appropriate speed. Whatever could have been causing that problem seems to have been fixed.

Quote from: Maelstrom on June 30, 2016, 04:52:36 AMNice!
One problem I found:
It glitches out playbackwaise in Google Chrome when it's not in the current tab.

Edit: and there's no way to tell just by looking at it that a note is repeated instead of just held.

I seem to be getting a similar issue in firefox. I am not sure what is causing, but since it is happening in both it is reasonable to assume that it has something to do with how browsers will execute scripts in the background. I will have to look into this to see if there is a solution.

PetrifiedLasagna

Just finished another update.

This one fixes a few issues with performance as well as how playback advances through the song.

Also regarding the issue where playback pauses when it is not the active tab. Browsers will pause or greatly slow down all execution of "requestAnimationFrame". I will see if there is a good way to push that to some other execution area so that playback won't pause.