I just wanted to make a note on how helpful David Healey is in this community, and that his tireless efforts to upgrade everyone’s knowledge are noticed and appreciated!
Thank you, David :)
Happy New Year!
I just wanted to make a note on how helpful David Healey is in this community, and that his tireless efforts to upgrade everyone’s knowledge are noticed and appreciated!
Thank you, David :)
Happy New Year!
Christoph,
First off, I would like to thank you for this amazing development tool for music :)
I am quite happy to be taking the plunge and learning as much about coding in HISE every day since watching and following the David Healey tutorial video: "How to make a synth"
Now, my main goals with HISE involve making MIDI plugins; some to be released as free utilities, and others as a paid product.
In my tests it seems that HISE does not receive or pass (thru) some MIDI message types:
MIDI clock
MTC
MMC
SysEx
etc.
Then there is Program Change, which HISE can accept and use, but not generate or pass (thru).
My concern:
When using HISE to make MIDI plugins, blocking these messages may deny users access to certain features that are needed for the next plugin in the chain (often a VSTi).
Therefore, if I am to produce MIDI plugins I am apprehensive about blocking those messages, and I, myself as a MIDI plugin customer would not be happy if a plugin that I purchased were to deny the passage of those messages to the output stage.
Personally, I do a lot of orchestral template mockups in a system where the articulation switching of VSTis is managed by expression maps (in Dorico, Nuendo, Bidule and Reaper) which are changed via incoming program change messages. Currently, I can't actually use any of my HISE produced MIDI plugins within this system, as without PC messages, it blocks the articulation switching.
In addition, there are many VSTis that can utilize program change messages directly to change patches. Kontakt, Omnisphere and VSL for starters.
And from my observation, it seems that many electronic producers with outboard gear setups require MTC (MIDI time code) and/or MIDI clock to sync devices.
I also have use-cases for plugin designs involving MIDI clock, MTC and SysEx and would love to have access to them for making custom MIDI controller managers.
Given that, I would like to add a feature request of three different levels (sorted from lowest to highest complexity):
Thanks for your time,
Craig
@clevername27 Thank you very much for your time!
You have a lot of incite to provide and I found the instruction as well as conversation to be quite worthwhile. I would certainly sign up again for more!
@d-healey said in HISE Meet Up:
@HISEnberg said in HISE Meet Up:
I don't think you could do spectral morphing in realtime
https://www.zynaptiq.com/morph/
https://web.archive.org/web/20180705061655/http://www.hakenaudio.com/RealTimeMorph/
I find the Kyma to be rather convincing for smooth morphing:
I would love to hear this kind of thing used to interpolate between sample sets for articulations that have capabilities for continuous control of timbre:
bow position, fluttertongue, growl, stick position on percussion etc.
There are a few different algorithms to choose from for morphing on the Kyma, and I don't know the details, but I think these are precomputed FFTs for resynthesis.
I am not sure what is causing this, but sometimes when I open a project/preset I am not getting any MIDI input and when I check the settings the MIDI inputs have been turned off:
Whereas I am certain I have saved it like this:
Yes, you can send MIDI out from button clicks.
I am working on a series of MIDI plugins at the moment.
You need to enable MIDI out in settings:
When using UI components to generate MIDI notes, you need to use Synth.addNoteOn() and Synth.addNoteOff() on the callback to you component.
Here I have pads (made with panels) which play chords when you use a mouse click.
It turns the notes off when the mouse is up.
// mouse callbacks for the pads --
pad.setMouseCallback(function[unitSize](event)
{
var ps = this.data.pitchSet;
var l = ps.length;
if (event.clicked)
{
var velocity = Math.round(event.y / unitSize * 127);
for (k = 0; k < l; k++)
Synth.addNoteOn(1, ps[k], velocity, 0);
}
if (event.mouseUp)
{
for (k = 0; k < l; k++)
Synth.addNoteOff(1, ps[k], 0);
}
});
To get the MIDI to output from the plugin,
as others have said you must use Message.sendToMidiOut();
To make sure it catches everything (and not some intermediate stage of MIDI),
I always place these functions in a script processor and container after all of my other containers:
And place the Message.sendToMidiOut() on each of the three MIDI callbacks:
@HISEnberg said in Let’s Build the “League of Newbies”:
@HISEnberg Done, I created the group chat. I guess anyone else who is interested can post here and we can add them in.
Add me :)
I'll check it out.
@d-healey It needs both ceil and floor to work, so I wrote an inline function to do the job:
inline function roundFix(value)
{
local remainder = Math.fmod(value, 1.0);
local roundedValue;
remainder >= 0.5 ? roundedValue = Math.ceil(value) : roundedValue = Math.floor(value);
return roundedValue;
};
const testRound = roundFix(4.49);
Console.print("test round: " + testRound);
const testRound1 = roundFix(4.5);
Console.print("test round: " + testRound1);
@d-healey said in Is there a method to rotate a path?:
@VirtualVirgin Instead of making a function to rotate a path, why not make a function to create a rotated path. You can pass in the data you would have used to create the initial path.
So based on your suggestion I came up with this and it seems to work:
inline function createRotatedPath(pathArray, angle, area)
{
local rad = Math.toRadians(angle);
local cosA = Math.cos(rad);
local sinA = Math.sin(rad);
local path = Content.createPath();
local rotationCenterX = area[0] + (area[2] * 0.5);
local rotationCenterY = area[1] + (area[3] * 0.5);
for (i = 0; i < pathArray.length; i++)
{
local x = pathArray[i][0];
local y = pathArray[i][1];
local newX = (x - rotationCenterX) * cosA - (y - rotationCenterY) * sinA + rotationCenterX;
local newY = (x - rotationCenterX) * sinA + (y - rotationCenterY) * cosA + rotationCenterY;
if (i == 0)
path.startNewSubPath(newX, newY);
else
path.lineTo(newX, newY);
}
path.closeSubPath();
return path;
}
The pathArray is a 2D array of x,y points
i.e.
[[x,y],[x,y] etc..]
@d-healey I'm imagining that you answered that question before I even submitted it! Lightning fast response.
@Chazrox said in Pushing Array Values || Its me again...:
for (i = 0; i < NumSliders.length; i++) { Slider2Values.push(SliderPack2.getSliderValueAt(i)); output += "\r"; }
You need to do some Console.prints to check any variables.
// if the loop has no length,
// no code will be executed
Console.print("NumSliders.length: " + NumSliders.length);
// make sure the component is available here
Console.print("SliderPack2: " + SliderPack2);
for (i = 0; i < NumSliders.length; i++)
{
// make sure there are values to be pushed
Console.print("SliderPack2 sliderValue " + i + ":" + SliderPack2.getSliderValueAt(i));
Slider2Values.push(SliderPack2.getSliderValueAt(i));
output += "\r";
}
@aaronventure Thanks!
This is great! What a useful feature.
I seem to be using a lot of .js files and so I'm just checking to see if there is a way to search terms in all of them at once, rather than switching tabs and performing the same search on each one.
@d-healey Thanks, I think the
ScriptPanel.setMouseCursor(var pathIcon, var colour, var hitPoint)
only accepts paths though.
That is the only reason I am converting the SVG glyphs to paths.
So this works but it's just a little clunky:
var testObject = {"testKey1": "testValue1", "testKey2": "testValue2"};
// removes a key from an object, but just be aware that it does not edit the object in place
// you must use the new object made here to replace the original
inline function objectRemoveKey(obj, keyToRemove)
{
local newObj = {};
for (key in obj)
{
if (key != keyToRemove)
{
newObj[key] = obj[key];
}
}
return newObj;
}
var testRemove = objectRemoveKey(testObject, "testKey1");
Console.print(trace(testRemove));
@d-healey Oop! Sorry I forgot to add this image:
Under the question "What are these different path options?".
They are the path options for the SVG to path converter.
"delete" does not work as expected:
There are some methods to iterate over the keys in the object and remove one and return a copy of the original, but that seems a little excessive and painful for that task at hand. Is there something simple like "delete"?
I can't seem to find much info in the documentation.
I did find this on David Healey's Youtube but it using a method with JUCE instead of the one in HISE: https://www.youtube.com/watch?v=OHqAijNUabU&t=65s
I am pretty sure there is a newer video, but I don't find it when searching either "svg" or "path" when searching the channel.
Anyway, I am looking to convert a lot of glyphs in SVG format to path as I need to use some of them for the
ScriptPanel.setMouseCursor(var pathIcon, var colour, var hitPoint)
What are these different path options?
Should I be using "HiseScript Path number array" format if I am just using the paths in HISE?
@Chazrox use timeStampSamples = 0
There is also another method depending on how you need to handle noteOn and noteOff.
If you use
Synth.addNoteOn(int channel, int noteNumber, int velocity, int timeStampSamples)
to add your notes I believe it returns the eventId.
With that you can use
Synth.noteOffByEventId(int eventId)
to match notes you made with the first method.
So for example:
local eventId = Synth.addNoteOn(1, 60, 127,0);
Then you can supply that eventId to make the matching noteOff.
@ericchesek What is it you are trying to achieve? When you are creating the sliders in a loop, are you appending the index number to each in the name?
Here are some examples of indexing for the ID:
// a loop to create sliders
inline function createSliders(stringName, numOfSliders)
{
local sliders = [];
for (i = 0; i < numOfSliders; i++)
{
// this appends the index to the slider name: "stringName + i"
local slider = Content.addKnob(stringName + i, 50 + i * 125, 50);
// this stores the component object inside an array
sliders[i] = slider;
slider.set("style", "vertical");
}
return sliders;
}
// call the function to create the sliders
const mySliders = createSliders("MySlider", 4);
// a separate array for the names ("Id")
const mySlidersIdArray = mySliders.map(function(element){return element.getId();});
Console.print("mySlidersIdArray: " + trace(mySlidersIdArray));
So there are multiple ways to use an index as ID to associate with a component.