electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
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 
go to the radio page Live at electro-music.com radio 1 Please visit the chat
poster
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
ScalaG2
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 3 [67 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: 1, 2, 3 Next
Author Message
ian-s



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

PostPosted: Fri Mar 30, 2007 11:19 pm    Post subject:  ScalaG2
Subject description: read scala tuning files and set G2 tuning
Reply with quote  Mark this post and the followings unread

Edit:
This functionality of this tool is now duplicated and added to in the general G2 file processing web app. no additional software required if you have the latest chrome or firefox.


Here is a new thread for the scalaG2 python tool.
It is not officially a part of G2ools at the moment.
I have fixed a sign/rounding bug since it was last posted. See here for initial discussion.

This zip contains the python program and starting template, as well as a couple of conversions from the free, 3000 file scala tuning library.

It assumes you have a working G2ools installation and can use the command prompt, just unzip into your g2ools folder.

Updated 6 April: 96 tone
14 April: Swiss rounding of fractional cents Rolling Eyes


scalaG2-02.zip
 Description:
Version 0.2

Download
 Filename:  scalaG2-02.zip
 Filesize:  15.26 KB
 Downloaded:  1834 Time(s)


Last edited by ian-s on Sat Mar 08, 2014 1:28 pm; edited 4 times in total
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24075
Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320

PostPosted: Sat Mar 31, 2007 4:20 am    Post subject: Reply with quote  Mark this post and the followings unread

.
arrow The latest g2ools.

arrow The the scala pages
.
edit: fixed the link to the scala pages Shocked

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.

Last edited by blue hell on Sun Jun 02, 2019 2:31 am; edited 4 times in total
Back to top
View user's profile Send private message Visit poster's website
iPassenger



Joined: Jan 27, 2007
Posts: 1067
Location: Sheffield, UK
Audio files: 5
G2 patch files: 78

PostPosted: Mon Apr 02, 2007 2:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

Intriguing.

R.

_________________
iP (Ross)
- http://ipassenger.bandcamp.com
- http://soundcloud.com/ipassenger
Back to top
View user's profile Send private message Visit poster's website
GovernorSilver



Joined: Apr 26, 2004
Posts: 1349
Location: Washington DC Metro
G2 patch files: 1

PostPosted: Tue Apr 03, 2007 2:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks, Ian, for your continued work. I've been slowed down by being sick, but hope to get going tonight. My plan is still the same:

1. Get a short Bach MIDI file
2. Get a MIDI file player for Mac OSX that can transmit MIDI output to the G2 (which I'll have connected to the Mac via USB)
3. Install Ian's Scala-loading tool and other needed tools to generate microtuned G2 patch
4. Play Bach MIDI file with G2 receiving MIDI
5. Record G2 audio output
6. Post MP3s of Bach piece as rendered in various tunings. One of the tunings should be 88-tone Equal Temperament or similarly extreme tuning.

Should be interesting! The best testing will happen if we can get enough microtonal composers involved, as far as listening to the MP3s and determining if the tunings are what they expected. Otherwise, it would be good to see comments like "That's not Fokker tuning! The 7ths are so obviously off by 3 cents!".
Back to top
View user's profile Send private message Visit poster's website
ian-s



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

PostPosted: Tue Apr 03, 2007 3:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

Good plan.

I no longer have MIDI available on my setup so I can't create the mp3's myself. The latest version has a 'transpose' control which allows those scales with 20 or more notes per octave to be shifted up to a usable range.
The LevAdd next to it is used to adjust the position in the tuning table for a given note number.
I get the impression that a lot of the 12T scales are designed for, or at least work best in, a specific key?
Back to top
View user's profile Send private message
seraph
Editor
Editor


Joined: Jun 21, 2003
Posts: 12398
Location: Firenze, Italy
Audio files: 33
G2 patch files: 2

PostPosted: Tue Apr 03, 2007 3:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

GovernorSilver wrote:
"That's not Fokker tuning! The 7ths are so obviously off by 3 cents!".

Paolo, you should know, by now, where you have to post those files to get similar answers Twisted Evil

_________________
homepage - blog - forum - youtube

Quote:
Don't die with your music still in you - Wayne Dyer
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24075
Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320

PostPosted: Tue Apr 03, 2007 4:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

g2ian wrote:

I get the impression that a lot of the 12T scales are designed for, or at least work best in, a specific key?


Yes, that's why ET (n^(1/12) for a 12 tone scale) was invented, but something got lost as well with that.

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
GovernorSilver



Joined: Apr 26, 2004
Posts: 1349
Location: Washington DC Metro
G2 patch files: 1

PostPosted: Tue Apr 03, 2007 9:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

g2ian wrote:

I get the impression that a lot of the 12T scales are designed for, or at least work best in, a specific key?


The 12-tone equal temperament that dominates contemporary music was the final evolution of a succession of earlier 12-tone temperaments/tunings, which aimed for "pleasing" intervals in the more common keys (C being the default key for some reason) with the compromise of those same intervals being less "pleasant" in less commonly used keys. Maybe it wasn't so much C being the default key as A being the favorite note for everyone to tune to (A being the relative minor of C).

Anyway, the progress I was able to make tonight was getting the MIDI player to transmit to the G2. I had to try several players, then I had to find a MIDI mapping application because my Max/MSP license was somehow no longer working on my Mac. I settled on:

Mighty MIDI (player) -> MIDI Patchbay (by Pete Yandell) -> MOTU MIDI Express 128 Interface -> G2

I learned that whoever writes these .mid files can specify whatever MIDI channels they want, so I really needed the MIDI Patchbay app to remap all data to Channel 1, then route MIDI data to the port on the MOTU to which my G2 is connected. In my search for Bach files, I focused on piano/harpsicord works, because with one instrument choice, it should be easier to hear the tuning.

BTW, the Bach MIDI files I used for testing sound very strange indeed with the G2 set to the Fokker-tuned patch. They sound very good in the Meantone patch.
Back to top
View user's profile Send private message Visit poster's website
ian-s



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

PostPosted: Tue Apr 03, 2007 11:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

GovernorSilver wrote:
BTW, the Bach MIDI files I used for testing sound very strange indeed with the G2 set to the Fokker-tuned patch. They sound very good in the Meantone patch.


The Fokker patch I posted has 54(?) notes per octave. It is 'interesting' to play.
Back to top
View user's profile Send private message
seraph
Editor
Editor


Joined: Jun 21, 2003
Posts: 12398
Location: Firenze, Italy
Audio files: 33
G2 patch files: 2

PostPosted: Tue Apr 03, 2007 11:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

g2ian wrote:

The Fokker patch I posted has 54(?) notes per octave. It is 'interesting' to play.

you can try using a sub-set of those 54 pitches to make playing it more manageable.

_________________
homepage - blog - forum - youtube

Quote:
Don't die with your music still in you - Wayne Dyer
Back to top
View user's profile Send private message Visit poster's website
GovernorSilver



Joined: Apr 26, 2004
Posts: 1349
Location: Washington DC Metro
G2 patch files: 1

PostPosted: Wed Apr 04, 2007 6:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ok, I got scalaG2.py to generate .pch2 files on my Powermac G4. As a recap, here are the instructions I followed:

1. Go to http://www.python.org/download/ and download Python for Mac OSX. I got 2.5

2. Run the Python installer

3. Download and unzip g2ools.zip

4. Download and unzip the scalaG2.zip. Unfortunately, Stuffit Expander (the Mac equivalent of WinZip) does not let you choose unzip a .zip file on top of an existing folder like WinZip does. So....

5. Manually copy scalaG2.py and G2SCL.pch2 into the g2ools folder. BOTH are needed, otherwise you'll get errors. The first time I tried to run the .py, I got an error because it couldn't find the nord folder, so you MUST copy it to the root folder of g2ools.

6. Start the Terminal app to get Mac OSX's command line prompt, cd to the g2ools folder (I put it in Applications, so it took me a while to figure out where it was in the file system).

7. Here is Ian's instruction to use the tool after all of the above (I paste them here from the older thread):

At the command prompt, type:

scalaG2.py scalafile1.scl scalafile2.scl ...
A pch2 file for each scala file is produced.

My comment: On Mac OSX add the ./, so it should be:
./scalaG2.py scalafile1.scl

Otherwise, you'll get a command-not-found type error Evil or Very Mad

I tried some 12-out of XX tunings but couldn't tell if they worked because they sound so close to standard 12TET. Then I had the tool generate from the 79 out of 159TET patch - the .pch2 file that was created had a much more dramatic effect.

So far, so good. I'll do some more .pch2 file generation testing tonight. I continue to be excited... Cool
Back to top
View user's profile Send private message Visit poster's website
seraph
Editor
Editor


Joined: Jun 21, 2003
Posts: 12398
Location: Firenze, Italy
Audio files: 33
G2 patch files: 2

PostPosted: Thu Apr 05, 2007 3:25 am    Post subject: Reply with quote  Mark this post and the followings unread

thanks Paolo Very Happy
_________________
homepage - blog - forum - youtube

Quote:
Don't die with your music still in you - Wayne Dyer
Back to top
View user's profile Send private message Visit poster's website
GovernorSilver



Joined: Apr 26, 2004
Posts: 1349
Location: Washington DC Metro
G2 patch files: 1

PostPosted: Thu Apr 05, 2007 5:44 am    Post subject: Reply with quote  Mark this post and the followings unread

I tested the tool with the Scala file "fj-96tet.scl". This file specifies 96-tone equal temperament.

Attached is the generated patch for this tuning.

I think only 74 notes out of the 96 are mapped to the keyboard.

To help debug this, I'll have to learn how MIDI Note Numbers are mapped in the G2. Note Number 0 is 5 octaves below middle C!

Also, the Scala .scl format does not specify how the starting pitch of the tuning is to be mapped to the keyboard - I beleive the implementation details are left up to the synth itself. Apparently, the way 96TET is supposed to be mapped is that from the first mapped note onwards, each pitch must be mapped to each Note Number until MIDI Note Number 127.

The tool is close to what we want. Very close, just needs tweaks like the above... Smile


fj-96tet.pch2
 Description:
Generated from Scala file "fj-96tet.scl"

Download
 Filename:  fj-96tet.pch2
 Filesize:  6.72 KB
 Downloaded:  2273 Time(s)

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



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

PostPosted: Thu Apr 05, 2007 10:55 am    Post subject: Reply with quote  Mark this post and the followings unread

96tet?

Embarassed

The current version only retunes up to 80 notes.
The reason it craps out after 76 is because I chose to have the table 'retune' ET. That is to say, the oscillators in the patch still track the keyboard and the tuning block provides a signed offset.
I chose this method because it would be easier to paste the tuning block into existing patches, without having to turn off the KBT on each oscillator.

Idea I'm not using the gate out of the SeqCtr at the moment, so I could configure it as a sign bit and have +/-128 instead of +/-64

I was thinking that 80 notes was a good tradeoff between usability and patch resources. The block currently uses 7.8% dsp and 23% mem.
I can add another 16 notes for 9.3/27% but that would be it due to headroom on the control signal. The sign logic is going to add a few % as well.

I'll have a go.
Back to top
View user's profile Send private message
GovernorSilver



Joined: Apr 26, 2004
Posts: 1349
Location: Washington DC Metro
G2 patch files: 1

PostPosted: Thu Apr 05, 2007 11:32 am    Post subject: Reply with quote  Mark this post and the followings unread

g2ian wrote:
96tet?

Embarassed

The current version only retunes up to 80 notes.
The reason it craps out after 76 is because I chose to have the table 'retune' ET. That is to say, the oscillators in the patch still track the keyboard and the tuning block provides a signed offset.
I chose this method because it would be easier to paste the tuning block into existing patches, without having to turn off the KBT on each oscillator.

Idea I'm not using the gate out of the SeqCtr at the moment, so I could configure it as a sign bit and have +/-128 instead of +/-64

I was thinking that 80 notes was a good tradeoff between usability and patch resources. The block currently uses 7.8% dsp and 23% mem.
I can add another 16 notes for 9.3/27% but that would be it due to headroom on the control signal. The sign logic is going to add a few % as well.

I'll have a go.


Ian, I tried 96TET as an extreme test. Twisted Evil I suspect most users will be working with subsets of such large pitch sets, but there might be some composer out there who wants to fire off a MIDI sequence that uses all 96 notes of 96TET.

I was just informed by Manuel Op De Coul, the author of Scala, that there is another type of Scala file, ".kbm", which specifies the keyboard mapping. This helps explain why the .scl files do not specify a mapping at all. My G2X keyboard doesn't even go below MIDI Note Number 12 (C which is 4 octaves below middle C), unless I am mistaken. Perhaps modifying scalaG2.py to take a .kbm file as an argument might address the usability vs. resource issue? Then we can avoid the problem of resources being unnecessarily wasted on the tuning block. As always, thank you for your efforts!

Here's what I found at the bottom of http://www.xs4all.nl/~huygensf/scala/help.htm:

Mappings

Keyboard mappings determine the allocation of scale degrees to keys on a MIDI keyboard, or MIDI note numbers in general.
[Snip Scala app-specific comments]
They can be created by using an external text editor, and the file type should be '.kbm'. They are activated by the command LOAD/MAP. An example template file is available: example.kbm. It contains various parameters on the first few lines and then the mapping defined by scale degrees for consecutive keys. For instance if it is 0, 1, 2, 3, etc., then it will be an ordinary linear mapping. 0, 2, 3 would mean degree 0 will be on the first key (which is the given middle note), degree 2 will be on the second key, degree 3 on the third, etc. Scale degrees can be mapped more than once. If a certain key is not to be tuned, an 'x' must be placed instead of a number. See also SHOW MAPPING, CLEAR/MAP and KEY/MAPPING. This is an example mapping:

! Template for a keyboard mapping
!
! Size of map (greater than or equal to the number of notes in the scale
! to be mapped). The pattern repeats every so many keys:
12
! First MIDI note number to retune:
0
! Last MIDI note number to retune:
127
! Middle note where scale degree 0 is mapped to:
60
! Reference note for which frequency is given:
69
! Frequency to tune the above note to (floating point e.g. 440.0):
440.0
! Scale degree to consider as formal octave (determines difference in pitch
! between adjacent mapping patterns):
12
! Mapping.
! The numbers represent scale degrees mapped to keys. The first degree is for
! the given middle note, the next for subsequent higher keys.
! For an unmapped key, put in an "x". At the end, unmapped keys may be left out.
0
1
2
3
4
5
6
7
8
9
10
11
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24075
Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320

PostPosted: Thu Apr 05, 2007 11:59 am    Post subject: Reply with quote  Mark this post and the followings unread

Just a sidenote, not criticizing anyone or anything, I love this thread. Still had no time though to really get into this, hopefully next weekend ... not sure yet ...

TET scales can be done cheaper by just multiplying the (12 TET) note control signal by a constant, e.g 2 for 6 TET or 0.125 for 96 TET. Ian's generic tuning scheme is more interesting IMO for other scale types. Still this opens up a good way to test Ian's patch builder tool as the the multiplication is pretty accurate and pretty fool proof to implement.

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
ian-s



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

PostPosted: Thu Apr 05, 2007 12:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just updated the zip.

The new version seems to work with 96TET files now. My hasty implementation of the 'trigger as sign bit' seems to have reversed the transpose control but that's not too difficult to work out.

I tested it on temp12fo1o.scl which is very subtle retuning of 12 tones which brings up two points.

The last entry in the file is 1201.5634, does this imply that each octave is stretched by 1.5634 cents, thats what the result is anyway. Also, I think I may have the fine tune component out by 0.5 but I'm not sure why at this stage. Will look at it later as its the first day of the holidays and the kids are all awake.
Back to top
View user's profile Send private message
cappy2112



Joined: Dec 24, 2004
Posts: 2465
Location: San Jose, California
Audio files: 2
G2 patch files: 1

PostPosted: Thu Apr 05, 2007 1:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
g2ian wrote:

I get the impression that a lot of the 12T scales are designed for, or at least work best in, a specific key?


Yes, that's why ET (n^(1/12) for a 12 tone scale) was invented, but something got lost as well with that.


Didn't you do a presentation that was TET-related for the NM1, or was that a different kind of TET?
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24075
Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320

PostPosted: Thu Apr 05, 2007 2:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

cappy2112 wrote:
Didn't you do a presentation that was TET-related for the NM1, or was that a different kind of TET?


Yes I did some equal tempered stuff for the Classic, see here.

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
ian-s



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

PostPosted: Thu Apr 05, 2007 3:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

g2ian wrote:
I think I may have the fine tune component out by 0.5 but I'm not sure why at this stage.


No, the fine tune is ok. I was just looking at it wrong.
Back to top
View user's profile Send private message
GovernorSilver



Joined: Apr 26, 2004
Posts: 1349
Location: Washington DC Metro
G2 patch files: 1

PostPosted: Fri Apr 06, 2007 10:28 am    Post subject: Reply with quote  Mark this post and the followings unread

Ian, I continue to be amazed by your speed. I'll try out the updated zip tonight.
Back to top
View user's profile Send private message Visit poster's website
dasz



Joined: Oct 16, 2004
Posts: 1644
Location: victoria, canada
Audio files: 29
G2 patch files: 56

PostPosted: Fri Apr 06, 2007 2:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

are you guys still using the sequencer idea? just wondering.
/Dasz
Back to top
View user's profile Send private message
ian-s



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

PostPosted: Fri Apr 06, 2007 2:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

dasz wrote:
are you guys still using the sequencer idea? just wondering.
/Dasz


I initially intended to select a retuning block based on the requirements of the scala file. Any scl file that has 16 or fewer notes per octave, and a final ratio of 2/1 could be handled by a modulo style block. That would prevent you from mixing arbitrary scales in the same pch2 via variations. It might still be worth it for the small saving in mem%.
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24075
Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320

PostPosted: Fri Apr 13, 2007 8:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Finally found some time to experiment with this.

I tried some different scales that I sort of randomly picked from the scala list and put those into the attached performance. The different scales are auto stepped through here (slowly) and it does make some difference which one it's in, but it seems to suggest that the real trick is in coming up with sensible relations between notes, as in harmony - and I have no idea what I'm doing really.

Anyway, some one might find it useful to copy some scale out of this (the scales used are listed in slot A).

Made the thread sticky .. had trouble to find it back already Very Happy


07-015-004.prf2
 Description:
fokker friendship :)

Download
 Filename:  07-015-004.prf2
 Filesize:  17.18 KB
 Downloaded:  2653 Time(s)


_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24075
Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320

PostPosted: Fri Apr 13, 2007 8:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

In the above patch there seems to be something odd with the zwolle scale (variaten 8) in that it has only fine tuning and no coarse ... I didn't look into how the scala files should work, so maybe it's all correct,

This is the scala data :

Code:

! zwolle2.scl
!
Henri Arnaut De Zwolle's modified meantone tuning (c. 1440)
 12
!
 76.04900
 193.15686
 303.09595
 5/4
 503.42157
 579.47057
 696.57843
 25/16
 889.73529
 1003.25876
 1082.89214
 2/1

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 3 [67 Posts]
View unread posts
View new posts in the last week
Goto page: 1, 2, 3 Next
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


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