Include external json file

I have my instruments in an external JSON file. Can I include them in a variable (matrix) with a for next loop?

trackInstruments v1.json (471 Bytes)

Have a read if this - we’ve been wrestling with something very similar…

Parsing from xml via json

Thanks for it...
I just saw now that my json file is still wrong because Excel makes me semicolons instead of commas when exporting to a CSV file. Must solve this first.

Oh dear... Here in Switzerland, when exporting from Excel to a CSV file, a semicolon is written as a separator, I had to change the app language for Excel to English (UK) on the Mac. Just by the way...

I now have the correct JSON file:
trackInstruments V2.json (582 Bytes)

Just out of interest - why are you exporting to excel and creating a json? If you have a look at the other thread above we’ve work out how to extract directly from xml so can you access that?

Looking at your json file it seems to be a dump from VEPro - can you find where VEPro saves it for use and access that?

I have only begun to understand OSC. Unfortunately I can't read the VEP file because it is saved in binary.
The Excel file is my main overview of all my instruments and is also easy to edit. I have my order there and only new instruments are added.
So why not convert the Excel file (csv) to a JSON file so I have all infos in OSC.
So that I can make a connection with the most important variables like "code" and "instrumentName".
So that when switching in Cubase the 4 digit code is read and I thus have in the OSC the appropriate instrument name to it.

For me this is one way but maybe there is an easier way?

Solved my problem

// Read my JSON File from converted Excel CSV
var trackInstrumets = loadJSON('../excel/trackInstruments.json')

			// Rename Button text_1 with 4 digits code
			if (trackname) {
				receive('/EDIT', 'text_1', {value: trackname})
			}

			// Rename Button text_2 with Instrument name
			var codeFromCubase = parseInt (trackname)
			var instrumentName = (trackInstrumets [codeFromCubase-1]['instrumentName'])
			if (trackname) {
				receive('/EDIT', 'text_2', {value: instrumentName})
			}