Author |
Message |
ian-s

Joined: Apr 01, 2004 Posts: 2672 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: 2672 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: 2672 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: 2672 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: 2672 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: 164 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: 2672 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
|
Back to top
|
|
 |
ian-s

Joined: Apr 01, 2004 Posts: 2672 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: 2672 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
|
|
 |
sellblue
Joined: Nov 24, 2021 Posts: 12 Location: Austria
Audio files: 3
G2 patch files: 1
|
Posted: Tue Jan 03, 2023 3:11 am Post subject:
Re: G2 sample playback. Subject description: Online app for sample playback. |
 |
|
ian-s wrote: | 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.
... |
Hi Ian, is this converter tool still available somewhere? The link seems like dead. I'm working on a TR-909 pach and would like to include the original hihat and cymbal samples into it. |
|
Back to top
|
|
 |
ian-s

Joined: Apr 01, 2004 Posts: 2672 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Wed Jan 04, 2023 3:11 pm Post subject:
|
 |
|
Vodafone went out of the personal web page hosting business a long time ago but I did rescue some of the old projects and put them on git hub. The sample idea didn't work so well though. Planned to auto switch variations to make longer samples but turns out there is a delay when a variation changes which spoils the result.
The bandwidth would not be high enough for cymbals I think. Can pm you a link if you like. |
|
Back to top
|
|
 |
sellblue
Joined: Nov 24, 2021 Posts: 12 Location: Austria
Audio files: 3
G2 patch files: 1
|
Posted: Thu Jan 05, 2023 12:04 am Post subject:
|
 |
|
ian-s wrote: | Vodafone went out of the personal web page hosting business a long time ago but I did rescue some of the old projects and put them on git hub. The sample idea didn't work so well though. Planned to auto switch variations to make longer samples but turns out there is a delay when a variation changes which spoils the result.
The bandwidth would not be high enough for cymbals I think. Can pm you a link if you like. |
Thanks Ian, I would highly appreciate the link.
TR-909 has 3(4) sampled instruments: Open / Closed Hihat, Ride and Crash packed into three 8 bit (originally 6 bit) samples. The sample rate is 32 kHz (originally 30 kHz).
So that would need 96 KB of memory and 32 kHz clock.
Regarding the bandwidth I could manage make a 48 kHz sample player (see 48kHz_Wave.pch2) however as you have mentioned the available "memory" in the serialy connected sequencers is limited.
In theory I see 2 x ~0.5 KB per patch (VA/FX) using sequencers. 8 variations could multiply it up to 8 KB however this methold sounds glitchy as mentioned.
Is there another workaround to pack large amount of data into a pch2 file (as ROM) and unpack it in the machine (eg. using delays as RAM)?
Description: |
Open / Closed Hihat - length 1s, (32 KB) - Sampling frequency: 32 kHz |
|
 Download (listen) |
Filename: |
r909hh.wav |
Filesize: |
32.04 KB |
Downloaded: |
139 Time(s) |
Description: |
Crash: - length 1s, (32 KB) - Sampling frequency: 32 kHz |
|
 Download (listen) |
Filename: |
r909cr.wav |
Filesize: |
32.04 KB |
Downloaded: |
131 Time(s) |
Description: |
Ride - length 1s, (32 KB) - Sampling frequency: 32 kHz |
|
 Download (listen) |
Filename: |
r909rd.wav |
Filesize: |
32.04 KB |
Downloaded: |
123 Time(s) |
Description: |
Wavetable player at fixed 48 kHz |
|
 Download (listen) |
Filename: |
48kHz_Wave.pch2 |
Filesize: |
1.17 KB |
Downloaded: |
347 Time(s) |
Last edited by sellblue on Thu Jan 05, 2023 10:44 pm; edited 1 time in total |
|
Back to top
|
|
 |
ian-s

Joined: Apr 01, 2004 Posts: 2672 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Thu Jan 05, 2023 1:40 pm Post subject:
|
 |
|
The OG utility can be accessed here.
I did experiment a bit with decoding each variation into a delay but couldn't get it working  |
|
Back to top
|
|
 |
sellblue
Joined: Nov 24, 2021 Posts: 12 Location: Austria
Audio files: 3
G2 patch files: 1
|
Posted: Fri Jan 06, 2023 3:12 am Post subject:
|
 |
|
Thanks a lot. |
|
Back to top
|
|
 |
|