NSM Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

Are you on Discord? Join our server!

Pages: [1] 2 3 4

Author Topic: NSM Sound Utilities [April 2, 2017]  (Read 3639 times)

PetrifiedLasagna

  • Ridley's Requiem
  • *******
  • Gender: Male
  • Posts: 176
  • Something should be written here... Oh well
    • View Profile
NSM Sound Utilities [April 2, 2017]
« on: June 10, 2016, 06:03:05 AM »

Hello all you NSM users, have I got something special for you! Now for those of you who don't know, I am an avid programmer. Like, it's my career choice, so you would expect that I would to code until I pass out.

Anyways ::), I am in the middle of developing several utility programs to make your transcription process all the more easier. Not only that, but I am going to give it to you in pure JavaScript. Yep, absolutely no third party plugins will be required to run these applications so all you really need is a respectable browser where the developers keep it up to date with W3 standards (Firefox, Google Chrome, Safari?).

I will also have all of the code available on GitHub for anybody who wishes to contribute to the cause.

Current projects:

- Flux Capacitor (GitHub) (Live Demo)(30%-40%)
info
This program will allow you to listen to an audio file of your choosing, while allowing you to change the playback speed. The catch is that it needs to do this without modifying the original pitch of the file. I am to make this as high quality as possible, i.e. minimize audio "whooshing" at low speeds for maximum usability.

Currently, this can load a local file specified by the user which can then be played. UI elements currently have no effect so no controlling speed. :P
[close]

- Virtuoso (GitHub) (Live Demo)(60-70%)
info
This idea is actually based on an old application that I was writing that would load a midi and then save a video file of it being played. I never finished that, but I am pretty familiar with the midi format, and it will be a lot easier to implement animating keys on this. The only thing I won't be able to do is video recording, so that part is up to the user.

This program has come a long way and has become so much more useful now, with features such as

- Load midis directly off your computer
- No connection needed once the page is loaded. Can even be downloaded to your computer
- Responsive note playback (velocity, sustain, realistic falloff and volume scaling)
- Displays the key, tempo, and sustain info
- Can start, stop, and set the time that the song will start playing at
[close]

NSMetronome (GitHub) (Live Demo - nsmdevsite) (Live Demo) (70%-80%)
info
A very simple tool similar in functionality to all8's bpm calculator. Instead of the live demo linking to my website, I have decided to show you guys that these can be readily integrated into for easy access.
[close]

Have any ideas for a cool tool? Post in the comments below and I will try to get back to you with some blueprints (design considerations, and that stuff) as soon as possible.

All live demos are hosted on my script hosting server.
« Last Edit: April 02, 2017, 03:34:57 PM by PetrifiedLasagna »
Logged

Tobbeh99

  • Nintendo Nocturne
  • ********************************
  • Gender: Male
  • Posts: 2125
    • View Profile
    • Youtube
Re: NSM Sound Utilities
« Reply #1 on: June 10, 2016, 11:55:14 AM »

I really appreciate your efforts. But in terms of tools for arranging, I think the combination of Audacity+Audiostretch definitely is enough to arrange any kinds of songs. With Audacity you can manipulate the audio file a lot, boosting bass/treble, raising/lowering the entire file 1 or more octaves up or down, and also equalizing the song. And with Audiostretch you can slow down a song to 0%, where it just stops on that very moment, you can even go pass that to minus %, but there's really not a reason to do that.

So I don't really have any idea of anything I'd need for arranging.
Logged
tfw you get schooled in English grammar by a guy whose first language is not English

10/10 tobbeh

E. Gadd Industries

  • Nintendo Nocturne
  • ********************************
  • Gender: Male
  • Posts: 2893
  • Super Mario Sunshine Enthusiast
    • View Profile
Re: NSM Sound Utilities
« Reply #2 on: June 10, 2016, 06:38:47 PM »

Whoa! This is cool! I would definitely use Virtuoso for when I start uploading my sheet tutorials to YouTube!
Logged
The entrance to my lab is hidden... somewhere...
Spoiler

[close]

PetrifiedLasagna

  • Ridley's Requiem
  • *******
  • Gender: Male
  • Posts: 176
  • Something should be written here... Oh well
    • View Profile
Re: NSM Sound Utilities
« Reply #3 on: June 10, 2016, 07:11:48 PM »

I really appreciate your efforts. But in terms of tools for arranging, I think the combination of Audacity+Audiostretch definitely is enough to arrange any kinds of songs. With Audacity you can manipulate the audio file a lot, boosting bass/treble, raising/lowering the entire file 1 or more octaves up or down, and also equalizing the song. And with Audiostretch you can slow down a song to 0%, where it just stops on that very moment, you can even go pass that to minus %, but there's really not a reason to do that.

So I don't really have any idea of anything I'd need for arranging.

I understand what you mean. I myself use Audacity and Audiostretch, but in terms of user-friendliness, Audiostretch is definitely lacking. Just from using it, I have come up with ways that some of the quirks could have spawned. Also, with only increments of ten I have found that it is not enough for 16th/32nd notes.

Just picture me listening to the same 2-3 second clip over and over again trying to pinpoint those speed demons. I just finished the advertise theme from bomberman 64 and that is loaded with 16ths at 190 bpm!  :o

As a programmer, I always want to ensure that the things I create fulfill the users needs (NSM in this case) without forcing them to deal with bugs or poor design choices. If you told me there was something wrong with my code without telling me specifically, I would immediately start reading every line of code, and using the application in an attempt to find it.

Also, typo in OP. I meant to say "without the use of plugins."  :P

Maelstrom

  • Resident Fire Emblem Expert
  • Updater
  • Nintendo Nocturne
  • *
  • Gender: Male
  • Posts: 6102
  • Go play Umineko
    • View Profile
Re: NSM Sound Utilities
« Reply #4 on: June 10, 2016, 07:38:47 PM »

Also, typo in OP. I meant to say "without the use of plugins."  :P
Ooo. What will you be using?
Logged

PetrifiedLasagna

  • Ridley's Requiem
  • *******
  • Gender: Male
  • Posts: 176
  • Something should be written here... Oh well
    • View Profile
Re: NSM Sound Utilities
« Reply #5 on: June 10, 2016, 07:54:22 PM »

Just some gold old-fashioned JavaScript.

PetrifiedLasagna

  • Ridley's Requiem
  • *******
  • Gender: Male
  • Posts: 176
  • Something should be written here... Oh well
    • View Profile
Re: NSM Sound Utilities
« Reply #6 on: June 12, 2016, 02:53:52 AM »

Okay guys, first live demo is up and running. It's not pretty now, but I will be making a lot of updates now that I have the audio engine down.

Dudeman

  • NSM's Least Active Mod
  • Global Moderator
  • Nintendo Nocturne
  • *
  • Gender: Male
  • Posts: 4416
  • Resident Rip Fanatic
    • View Profile
    • Email
Re: NSM Sound Utilities
« Reply #7 on: June 12, 2016, 03:38:19 AM »

Well, I can certainly load in an audio file. This appears to be coming along nicely. I hope you're able to implement the other elements soon.
Logged
All Hail Lkjhgfdsa_77

[close]

PetrifiedLasagna

  • Ridley's Requiem
  • *******
  • Gender: Male
  • Posts: 176
  • Something should be written here... Oh well
    • View Profile
Re: NSM Sound Utilities
« Reply #8 on: June 12, 2016, 07:57:30 AM »

Just throwing this out there so I don't forget. Feel free to correct me if I have it wrong.

Do not read if you hate research papers  ;)
Begin Memo on pitch/frequency
Pitch/Frequency are a function of wavelength, therefore by maintaining pitch you are also maintaining frequency. The "easy" methods of changing the speed of sound result in a proportionally different frequency than what the original audio had. For example, doubling the sample rate will also double the frequency since the samples will be played twice as fast. Same thing if you halve the length of the audio and go over every other audio sample (although in this case there is a loss of data).

Several tests have provided insight into how a slowed down effect can be achieved. In audacity, when a short noise sample with some silence for padding can have the "change tempo" effect applied to it, with some interesting results. The sound becomes extremely choppy and it is possible to see that this sample was mixed with the surrounding silence.


Hypothesis:
Therefore, in order to slow down audio without changing frequency, for every so many steps that are taken forward you must take a proportional amount of steps back. So in order to say, halve the speed of a sample, if you parsed through 8 sample, you would then go back 4 samples, parse 8 samples and so on.

This could be similarly be achieved in a streaming fashion by taking a timer value T, and playing T through T + constant C(e.g. 48), but then only setting T to T + C * percentage P (1% - +100%). This will likely result in choppy audio at very low speeds and will probably need some tweaking.


End Memo
[close]

It is to late for me to be thinking this intensely.  :'(

BlackDragonSlayer

  • Nintendo Nocturne
  • ********************************
  • Gender: Male
  • Posts: 6865
  • Black Dragons Beware
    • View Profile
Re: NSM Sound Utilities
« Reply #9 on: June 12, 2016, 07:58:03 AM »

Ooh, sounds neat! Haven't checked out the demo yet, but I'll definitely be interested in seeing the finished product!
Logged
And the moral of the story: Quit while you're a head.

Nornova Dex
NSM Sprite Thread
Compositions
Story Thread

Maelstrom

  • Resident Fire Emblem Expert
  • Updater
  • Nintendo Nocturne
  • *
  • Gender: Male
  • Posts: 6102
  • Go play Umineko
    • View Profile
Re: NSM Sound Utilities
« Reply #10 on: June 12, 2016, 05:05:28 PM »

This may sound like a strange request, but could eventually put in a compact vertical mode so it'd be easy to have finale open and this on the side?
Logged

PetrifiedLasagna

  • Ridley's Requiem
  • *******
  • Gender: Male
  • Posts: 176
  • Something should be written here... Oh well
    • View Profile
Re: NSM Sound Utilities
« Reply #11 on: June 12, 2016, 07:48:41 PM »

This may sound like a strange request, but could eventually put in a compact vertical mode so it'd be easy to have finale open and this on the side?

This actually responds to the size of the window (or phone screen).  ;)

If anyone has an iPad, feel free to try it. It should definitely work on there, although I have heard that the first JavaScript sound that is played will be ignored, so you may have to press the play button twice.

PetrifiedLasagna

  • Ridley's Requiem
  • *******
  • Gender: Male
  • Posts: 176
  • Something should be written here... Oh well
    • View Profile
Re: NSM Sound Utilities
« Reply #12 on: June 14, 2016, 12:34:18 AM »

If anyone has an iPad, feel free to try it. It should definitely work on there...

Wow, I can't believe that I actually uttered such an ignorant sentence... Although I did post at like 1-2 in the morning :P
Maybe if I add the ability to use files from the web that it will be possible to use on a tablet.

Anyways, I have another update out. Most of the UI elements that there will be in the future have been added. This includes
- File status
- Time
- Time controller

Also, all of the UI elements that are present are operational. I currently have an algorithm that can apply pitch-perfect audio slowing, but it is not the best quality. Basically what I do is every time the number of samples parsed exceeds the Constant multiplied by the speed percentage, I will go back to the first sample that was parsed. It gets the job done, but it is not the best. I will post the code snippet below, so it is easier to see what it does.
Spoiler
Code: [Select]
//c is the current channel being parsed
//i is the current sample
//nTime is equal to a constant value OR the distance from the end of the file
//controls.speed is the percentile speed (1.0 to 0.0)

if(i > 0 && (i-ioffs > nTime * controls.speed)){
  ioffs = i;
}

destinationBuff[c][i] = audioData.data[c][(i - ioffs) + offs];
[close]

The live demo has already been updated

PetrifiedLasagna

  • Ridley's Requiem
  • *******
  • Gender: Male
  • Posts: 176
  • Something should be written here... Oh well
    • View Profile
Re: NSM Sound Utilities
« Reply #13 on: June 14, 2016, 08:13:23 PM »

I am slow close to figuring out a good algorithm to slow the audio down. I know it is just sitting in front of me right now and I don't see it.  :-\

Also, look forward to having no choppy playback in the next update since I added a scheduler.

NocturneOfShadow

  • Nintendo Nocturne
  • ********************************
  • Gender: Male
  • Posts: 10368
  • This is Halloween
    • View Profile
Re: NSM Sound Utilities
« Reply #14 on: June 14, 2016, 08:21:20 PM »

maybe now is a good time for a break.  Look at it with fresh eyes :P
Logged
time for a splatfest! Christmas vs Halloween!

only Christmas sucks so Halloween wins by default
Pages: [1] 2 3 4
 

Page created in 0.132 seconds with 22 queries.