@d-healey Cracked it... it was, as you suggested a sneaky EOL return in the generated file. Some tweaks to the post install script and now it all works.
Best posts made by M_Holloway
-
RE: LinkOSX oddness
-
RE: Display TimeSync Value 1/2, 1/2 dotted , 1/4 triplt via Label
Something like this should do it...
const var myKnob = Content.getComponent("myKnob"); const var myLabel = Content.getComponent("myLabel"); inline function onmyButtonControl(component, value) { if(value) myKnob.setMode("TempoSync"); else myKnob.setMode("Frequency"); }; Content.getComponent("myButton").setControlCallback(onmyButtonControl); inline function onmyKnobControl(component, value) { local mode = myKnob.get("mode"); if(mode == "TempoSync") myLabel.set("text", Engine.getTempoName(value)); else myLabel.set("text", value + " Hz"); }; Content.getComponent("myKnob").setControlCallback(onmyKnobControl);
-
RE: Display TimeSync Value 1/2, 1/2 dotted , 1/4 triplt via Label
@d-healey Nice, every day is a school day ... off to go deleting some arrays now...
Latest posts made by M_Holloway
-
RE: LinkOSX oddness
@d-healey Cracked it... it was, as you suggested a sneaky EOL return in the generated file. Some tweaks to the post install script and now it all works.
-
RE: LinkOSX oddness
@d-healey I already looked in the user Application Support folder and there's nothing there that should be affecting it.
-
RE: LinkOSX oddness
Is there anywhere else it could be looking at for the sample location? As an experiment, I deleted the LinkOSX file and all of the various locations I'd put samples while testing and on opening the standalone, the text label, - which in theory should have been blank - showed an old sample location.
-
RE: LinkOSX oddness
Thanks for that; your suggestion doesn't break anything, but the problem still persists. It seems odd when the two routines are essentially performing the same operation.
-
RE: LinkOSX oddness
@d-healey Just tried it again to check this and no, the permissions stay the same.
I wondered if it was because the LinkOSX was getting overwritten in the manual sample folder location routine so added
linkOSX.writeString(linkTxt);
to the initialisation routine to see if that made a difference... it didn't
-
LinkOSX oddness
I have a sample install package that allows users to select the sample location and, in a post install script, write that location to the LinkOSX file.
This all seems to work fine and when I open the LInkOSX in a text editor, it reads correctly.
In my plugin/standalone, on initialisation, it grabs the LinkOSX file text, sets this as the sample folder, reloads all samples and sets a label to the current sample location...
const var linkOSX = FileSystem.fromAbsolutePath("/Library/Application Support/myPlugin/LinkOSX"); const var linkTxt = linkOSX.loadAsString(); currentSampleLoc.set("text", linkTxt); //sets label text Settings.setSampleFolder(linkTxt); Engine.reloadAllSamples();
or at least it should but although the label shows the correct path, no samples play.
I have a button in my settings UI that allows users to select the sample location from within the plugin and when clicked it opens to the sample folder set in LinkOSX (located using FileSystem.Samples) and then after that is selected it works fine and the samples play as expected.
inline function oncurrentSampleBtnControl(component, value) { if(value) FileSystem.browseForDirectory(startFolder, function(sampleDir) { if (isDefined(sampleDir) && sampleDir.isDirectory()) {newLoc = sampleDir.toString(0); Settings.setSampleFolder(newLoc); Engine.reloadAllSamples(); currentSampleLoc.set("text", newLoc); linkOSX.writeString(newLoc);} }); }; Content.getComponent("currentSampleBtn").setControlCallback(oncurrentSampleBtnControl);
Inspecting the LinkOSX file after this has run reveals a new modification timestamp but the text within is identical to before.
Any ideas anyone?
-
RE: Quick Question About Compiled Mac M1/M2!
@Natan I have an M2 and every export I've made works fine on both architectures
-
RE: Display TimeSync Value 1/2, 1/2 dotted , 1/4 triplt via Label
Something like this should do it...
const var myKnob = Content.getComponent("myKnob"); const var myLabel = Content.getComponent("myLabel"); inline function onmyButtonControl(component, value) { if(value) myKnob.setMode("TempoSync"); else myKnob.setMode("Frequency"); }; Content.getComponent("myButton").setControlCallback(onmyButtonControl); inline function onmyKnobControl(component, value) { local mode = myKnob.get("mode"); if(mode == "TempoSync") myLabel.set("text", Engine.getTempoName(value)); else myLabel.set("text", value + " Hz"); }; Content.getComponent("myKnob").setControlCallback(onmyKnobControl);
-
RE: Display TimeSync Value 1/2, 1/2 dotted , 1/4 triplt via Label
@d-healey Nice, every day is a school day ... off to go deleting some arrays now...
-
MIDI Timecode
Hi
Does anyone know if it's possible to grab and parse MTC generated by the host DAW? I've looked through the forum and haven't found anything and I'm not seeing anything in the API.
The transport handler seemed the obvious candidate and, obviously it can generate bars/beats but I'll need this to be frame accurate. If there's a way to grab the sample position, I can run the maths to calculate MTC from that but a true MTC sync would be better.
I get that for instruments, MTC is not really needed but I've got a bit of an idea for a plugin that will need to grab MTC and then perform an action at target MTC values.
Cheers
Mike