electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
Live streaming at radio.electro-music.com

  host / artist show at your time
  Jez Adventures in Sound
Please visit the chat
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
G2 sample playback.
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [14 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
ian-s



Joined: Apr 01, 2004
Posts: 2574
Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 608

PostPosted: Sat Feb 15, 2014 12:43 pm    Post subject: G2 sample playback.
Subject description: Online app for sample playback.
Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
ian-s



Joined: Apr 01, 2004
Posts: 2574
Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 608

PostPosted: Sat Feb 15, 2014 12:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
ian-s



Joined: Apr 01, 2004
Posts: 2574
Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 608

PostPosted: Sat Feb 15, 2014 5:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Lfohead



Joined: Jul 29, 2009
Posts: 266
Location: Sweden
Audio files: 6
G2 patch files: 24

PostPosted: Sat Feb 15, 2014 7:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

Nice! will have a look soon Smile
Back to top
View user's profile Send private message
anigbrowl



Joined: Jan 21, 2008
Posts: 114
Location: San Francisco, USA
G2 patch files: 5

PostPosted: Sun Feb 16, 2014 3:29 pm    Post subject:   Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
ZeeByeZon



Joined: Mar 16, 2009
Posts: 29
Location: France
G2 patch files: 1

PostPosted: Mon Feb 17, 2014 3:51 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
ian-s



Joined: Apr 01, 2004
Posts: 2574
Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 608

PostPosted: Mon Feb 17, 2014 4:11 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
ZeeByeZon



Joined: Mar 16, 2009
Posts: 29
Location: France
G2 patch files: 1

PostPosted: Mon Feb 17, 2014 10:08 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
ian-s



Joined: Apr 01, 2004
Posts: 2574
Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 608

PostPosted: Mon Feb 17, 2014 11:29 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
xav



Joined: Mar 21, 2005
Posts: 144
Location: paris
Audio files: 8
G2 patch files: 7

PostPosted: Mon Feb 17, 2014 4:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

That seems like a sample converter for G2... is it possible?
Incredible!
Back to top
View user's profile Send private message
ian-s



Joined: Apr 01, 2004
Posts: 2574
Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 608

PostPosted: Sat Feb 22, 2014 12:13 am    Post subject: Reply with quote  Mark this post and the followings unread

Just uploaded a significant update. Same link as op.

The app now uses the hi res dual pair of sequencers and utilities the FX area so you still have the same number of patches and sample time.

The sample start trimmer is shorter to reflect the higher sample rate. The name of files that you use and their time scale is recorded in the text pad area for future reference.

I have attached a sample performance to indicate how to trigger the samples. I had planned on allowing you to span more than one variation with a single sample but am having some trouble getting the triggering to work. If you click on the span cell in the table, the number will increase by one and the system will split the file across that number of slots. Be careful, I haven't implemented any bounds checks so if the total of all the spans > 8 you might crash the app. I mention it only in case someone wants to have a go at getting the multi-var trigger working.

The sample prf2 has an extra seguencer to compensate for a 32nd note timing issue I haven't tracked down yet.


new prf.prf2
 Description:
just to show how you might trigger one of these sample patches.
Triggering likely to change in future versions.

Download
 Filename:  new prf.prf2
 Filesize:  28.97 KB
 Downloaded:  111 Time(s)

Back to top
View user's profile Send private message
ian-s



Joined: Apr 01, 2004
Posts: 2574
Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 608

PostPosted: Sun Feb 23, 2014 11:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just published the version with midi>pch2 function ported from the other app. This version uses a new template that contains 80bars and has the option of setting individual tracks to SlotA-D (or off).

There is a compromise for the extra bars, each variation now has 10 bars which doesn't allow repeating sets of bars multiple times. I should allow for selection of a more 4:4 friendly template in a future version.

Here is an example (muss_7.mid again sorry) but at least the entire thing fits in this time at 4*higher timing resolution.


m7.prf2
 Description:
The whole promenade in higher res, + a little bit of the next...
THe prf2 shows how to chain variations with 10 bars each.

Download
 Filename:  m7.prf2
 Filesize:  49.84 KB
 Downloaded:  122 Time(s)

Back to top
View user's profile Send private message
urbanspaceman



Joined: Feb 26, 2008
Posts: 61
Location: italy

PostPosted: Wed Mar 19, 2014 8:24 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
ian-s



Joined: Apr 01, 2004
Posts: 2574
Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 608

PostPosted: Wed Mar 19, 2014 11:27 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [14 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use