Author |
Message |
ian-s

Joined: Apr 01, 2004 Posts: 2664 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Sat Feb 15, 2014 12:43 pm Post subject:
G2 sample playback. Subject description: Online app for sample playback. |
 |
|
link
Chrome or Firefox only, get latest if not sure. Works almost on IE10 but link wont save so useless.
Here we go. Alpha 0.1 of online audio sample to pch2 creator. Still a bit rough sorry.
Use the choose file button to select .bin, .wav, .aif(f) files. The program will accept uncompressed 8 bit bin files but has no way of telling because they don't have a header. Many available on the net have the ROM type code like 2716 included in the file name so the program assumes anything with 27 somewhere in the file name is not a-law compressed. If a wave looks wrong, try adding 27 to the filename. While the uncompressed .bin files work, they are only 8 bit originally so wont sound as good as the a-law DX roms.
When a file is loaded, it’s wave is displayed twice. Original and 2:1 compressed. A scale indicates how much of the wave will fit into a single G2 variation. Use the other scale buttons to change to other ratios. The last selected ratio will be how the wave is saved to the G2.
Add up to 8 files. You can go back to view other waves by clicking on its row in the table but I haven’t implemented delete or replace yet.
When happy with your set, click the Get PCH2 button and download your pch2 file. Last edited by ian-s on Sat Feb 15, 2014 12:52 pm; edited 1 time in total |
|
Back to top
|
|
 |
ian-s

Joined: Apr 01, 2004 Posts: 2664 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Sat Feb 15, 2014 12:46 pm Post subject:
|
 |
|
To do list:
Add trim start control
Allow multi-variation spanning so one sample can span up to 8 variations.
Web audio auditioning of sounds.
Allow deleting an entry from the table.
Put name bars into pch to record filenames and ratios.Write names etc to textpad: done
Allow selection of patch envelope time??? Last edited by ian-s on Mon Feb 17, 2014 4:13 am; edited 1 time in total |
|
Back to top
|
|
 |
ian-s

Joined: Apr 01, 2004 Posts: 2664 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Sat Feb 15, 2014 5:14 pm Post subject:
|
 |
|
Please feel free to report any issues or make comments here.
The AIFF format file header records the sample rate as an 80bit extended floating point number so I don't know if my code will report correctly > 48K.
You should probably downsample in a wave editor if you have any very high sample rate files anyway.
The decimation in my code uses a very basic FIR.
Hopefully Tim will come up with a higher resolution sample patch with frequency shifting and I can tweak the code to work with it. |
|
Back to top
|
|
 |
Lfohead
Joined: Jul 29, 2009 Posts: 289 Location: Sweden
Audio files: 6
G2 patch files: 28
|
Posted: Sat Feb 15, 2014 7:48 pm Post subject:
|
 |
|
Nice! will have a look soon  |
|
Back to top
|
|
 |
anigbrowl
Joined: Jan 21, 2008 Posts: 116 Location: San Francisco, USA
G2 patch files: 5
|
Posted: Sun Feb 16, 2014 3:29 pm Post subject:
|
 |
|
Most interesting. I just did a quick test on one file so far but the results were very positive. Particularly interested to see that you plan to implement MIDI files. |
|
Back to top
|
|
 |
ZeeByeZon
Joined: Mar 16, 2009 Posts: 32 Location: France
G2 patch files: 1
|
Posted: Mon Feb 17, 2014 3:51 am Post subject:
|
 |
|
Great work !
Will it be possible to download the app to run it without internet connection?
I tried it quickly and I think it would be better to normalize the wave before converting to pch. I had some example where the sound is much too low. |
|
Back to top
|
|
 |
ian-s

Joined: Apr 01, 2004 Posts: 2664 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Mon Feb 17, 2014 4:11 am Post subject:
|
 |
|
ZeeByeZon wrote: | Great work !
Will it be possible to download the app to run it without internet connection?
I tried it quickly and I think it would be better to normalize the wave before converting to pch. I had some example where the sound is much too low. |
You can run it locally only if you have a local server like visual studio or something, the problem is the browser wont accept the template blobs from a local file system.
I could look at implementing an app.manifest so it could run off line, but my isp won't allow that mime type.
I'm working on a 2xsample rate version but yes, doing the optimization in a wave editor is a good idea. The old drum Roms work well because they are carefully sampled at a pretty low rate. I should put a link to the collection I have on the page. |
|
Back to top
|
|
 |
ZeeByeZon
Joined: Mar 16, 2009 Posts: 32 Location: France
G2 patch files: 1
|
Posted: Mon Feb 17, 2014 10:08 am Post subject:
|
 |
|
In fact I meant the volume is too low, some wav samples may not use the full dynamic range and in such cases, the volume should be raised.
This needs a first pass to measure the maximum amplitude in the sound file, then a second pass to apply a gain to each sample. |
|
Back to top
|
|
 |
ian-s

Joined: Apr 01, 2004 Posts: 2664 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Mon Feb 17, 2014 11:29 am Post subject:
|
 |
|
ZeeByeZon wrote: | In fact I meant the volume is too low, some wav samples may not use the full dynamic range and in such cases, the volume should be raised.
This needs a first pass to measure the maximum amplitude in the sound file, then a second pass to apply a gain to each sample. |
Good point, Normalization is easy to do. Will add to my list. Probably normalize just prior to the a-law compression.
I have a rather large collection of 8 bit samples including DX,DMX,SCI,LINN and SQ80 which I'll make available in a zip archive.
I imagine that most people would like to use there own wav or aiff files though. Last edited by ian-s on Mon Feb 17, 2014 6:52 pm; edited 1 time in total |
|
Back to top
|
|
 |
xav

Joined: Mar 21, 2005 Posts: 158 Location: paris
Audio files: 8
G2 patch files: 7
|
Posted: Mon Feb 17, 2014 4:44 pm Post subject:
|
 |
|
That seems like a sample converter for G2... is it possible?
Incredible! |
|
Back to top
|
|
 |
ian-s

Joined: Apr 01, 2004 Posts: 2664 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
|
Back to top
|
|
 |
ian-s

Joined: Apr 01, 2004 Posts: 2664 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
|
Back to top
|
|
 |
urbanspaceman
Joined: Feb 26, 2008 Posts: 77 Location: italy
|
Posted: Wed Mar 19, 2014 8:24 am Post subject:
|
 |
|
hi, i tried on chrome and ff on linux with no success..
any idea?
The code is opensource?
i'm a web developer and i'm interested on the code side |
|
Back to top
|
|
 |
ian-s

Joined: Apr 01, 2004 Posts: 2664 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Wed Mar 19, 2014 11:27 am Post subject:
|
 |
|
urbanspaceman wrote: | hi, i tried on chrome and ff on linux with no success..
any idea?
|
What is linux?
Just kidding. I don't have access to linux machine. Do those browsers support javascript 5 with typed arrays?
I know there is an issue with IE10, everything works except for the final conversion of the patch data to a downloadable link.
urbanspaceman wrote: | The code is opensource?
i'm a web developer and i'm interested on the code side |
NordPch2.js and ModuleDic.js are derived from the g2ools python github project. I only converted enough to service this task however. You would need to do a fare amount of work to get it to the point where it can add to (rather than just modify) a pch2.
The alaw compression was a bit tricky to get working but outside of this app, it probably isn't of much use. Midi and wave file parsing has not been exhaustively tested so please feel free to use whatever you like.
ZenDom only works on modern browsers but I have a shim that allows it to be used on IE8 and above. Let me know if you are interested. I am still not sure if it is a good idea. |
|
Back to top
|
|
 |
|