Jump to content


Photo

Note event in formula device?


  • Please log in to reply
3 replies to this topic

#1 ffx

ffx

    Composes without Wires burns Directly from Brain to DVD that is already in Store Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3490 posts
  • Gender:Not Telling

Posted 10 September 2018 - 10:13

Is it possible in the formula device to determine whether a note playing occurs?

 

I would like to build a fake per-note panner, so it pans abruptly on note event, following a small rotating table of panning values. Is it possible?

 

Currently I have this, but I would like to get rid of the keytracker and LFOs:

<?xml version="1.0" encoding="UTF-8"?>
<FilterDeviceClipboard doc_version="0">
  <DeviceSlot type="DooferDevice">
    <IsMaximized>true</IsMaximized>
    <IsSelected>true</IsSelected>
    <SelectedPresetName>Ju LFO Step Panner Always</SelectedPresetName>
    <SelectedPresetLibrary>User Library</SelectedPresetLibrary>
    <SelectedPresetIsModified>false</SelectedPresetIsModified>
    <IsActive>
      <Value>1.0</Value>
      <Visualization>Device only</Visualization>
    </IsActive>
    <Macro0>
      <Value>50</Value>
      <Visualization>Device only</Visualization>
    </Macro0>
    <Macro1>
      <Value>50</Value>
      <Visualization>Device only</Visualization>
      <Name>LFO Offset</Name>
    </Macro1>
    <Macro2>
      <Value>50</Value>
      <Visualization>Device only</Visualization>
      <Name>Macro 3</Name>
    </Macro2>
    <Macro3>
      <Value>4.00000477</Value>
      <Visualization>Device only</Visualization>
      <Name>LFO Wave</Name>
    </Macro3>
    <Macro4>
      <Value>50</Value>
      <Visualization>Device only</Visualization>
      <Name>Macro 5</Name>
    </Macro4>
    <Macro5>
      <Value>50</Value>
      <Visualization>Device only</Visualization>
      <Name>Macro 6</Name>
    </Macro5>
    <Macro6>
      <Value>50</Value>
      <Visualization>Device only</Visualization>
      <Name>Macro 7</Name>
    </Macro6>
    <Macro7>
      <Value>50</Value>
      <Visualization>Device only</Visualization>
      <Name>Macro 8</Name>
    </Macro7>
    <NumActiveMacros>1</NumActiveMacros>
    <ShowDevices>true</ShowDevices>
    <DeviceChain>
      <SelectedPresetName>Init</SelectedPresetName>
      <SelectedPresetLibrary>Bundled Content</SelectedPresetLibrary>
      <SelectedPresetIsModified>true</SelectedPresetIsModified>
      <Devices>
        <LfoDevice type="LfoDevice">
          <IsMaximized>true</IsMaximized>
          <IsSelected>false</IsSelected>
          <SelectedPresetName>Init</SelectedPresetName>
          <SelectedPresetLibrary>Bundled Content</SelectedPresetLibrary>
          <SelectedPresetIsModified>true</SelectedPresetIsModified>
          <IsActive>
            <Value>1.0</Value>
            <Visualization>Device only</Visualization>
          </IsActive>
          <DestTrack>
            <Value>-1</Value>
            <Visualization>Device only</Visualization>
          </DestTrack>
          <DestEffect>
            <Value>1.0</Value>
            <Visualization>Device only</Visualization>
          </DestEffect>
          <DestParameter>
            <Value>2</Value>
            <Visualization>Device only</Visualization>
          </DestParameter>
          <Amplitude>
            <Value>0.152000263</Value>
            <Visualization>Device only</Visualization>
          </Amplitude>
          <Offset>
            <Value>0.0</Value>
            <Visualization>Device only</Visualization>
          </Offset>
          <Frequency>
            <Value>4.31999588</Value>
            <Visualization>Device only</Visualization>
          </Frequency>
          <Type>
            <Value>0.0</Value>
            <Visualization>Device only</Visualization>
          </Type>
          <CustomEnvelope>
            <PlayMode>Linear</PlayMode>
            <Length>64</Length>
            <ValueQuantum>0.0</ValueQuantum>
            <Polarity>Unipolar</Polarity>
            <Points>
              <Point>0,0.0</Point>
              <Point>63,1.0</Point>
            </Points>
          </CustomEnvelope>
          <CustomEnvelopeOneShot>false</CustomEnvelopeOneShot>
          <UseAdjustedEnvelopeLength>true</UseAdjustedEnvelopeLength>
        </LfoDevice>
        <FormulaMetaDevice type="FormulaMetaDevice">
          <IsMaximized>false</IsMaximized>
          <IsSelected>true</IsSelected>
          <SelectedPresetName>lfo val on note</SelectedPresetName>
          <SelectedPresetLibrary>User Library</SelectedPresetLibrary>
          <SelectedPresetIsModified>true</SelectedPresetIsModified>
          <IsActive>
            <Value>1.0</Value>
            <Visualization>Device only</Visualization>
          </IsActive>
          <FormulaParagraphs>
            <FormulaParagraph>func(A, B)</FormulaParagraph>
          </FormulaParagraphs>
          <FunctionsParagraphs>
            <FunctionsParagraph>local last = 0</FunctionsParagraph>
            <FunctionsParagraph>local backVal = 0</FunctionsParagraph>
            <FunctionsParagraph>function func(a, b)</FunctionsParagraph>
            <FunctionsParagraph>  local newNote = false</FunctionsParagraph>
            <FunctionsParagraph>  if (a ~= last) then last = a;backVal = b;newNote = true end</FunctionsParagraph>
            <FunctionsParagraph>  return backVal</FunctionsParagraph>
            <FunctionsParagraph>end</FunctionsParagraph>
            <FunctionsParagraph/>
          </FunctionsParagraphs>
          <InputNameA>A</InputNameA>
          <InputNameB>B</InputNameB>
          <InputNameC>C</InputNameC>
          <EditorVisible>true</EditorVisible>
          <InputA>
            <Value>0.623362899</Value>
            <Visualization>Device only</Visualization>
          </InputA>
          <InputB>
            <Value>0.425163925</Value>
            <Visualization>Device only</Visualization>
          </InputB>
          <InputC>
            <Value>0.0</Value>
            <Visualization>Device only</Visualization>
          </InputC>
          <DestTrack>
            <Value>-1</Value>
            <Visualization>Device only</Visualization>
          </DestTrack>
          <DestEffect>
            <Value>2</Value>
            <Visualization>Device only</Visualization>
          </DestEffect>
          <DestParameter>
            <Value>2</Value>
            <Visualization>Device only</Visualization>
          </DestParameter>
        </FormulaMetaDevice>
        <GainerDevice type="GainerDevice">
          <IsMaximized>true</IsMaximized>
          <IsSelected>false</IsSelected>
          <SelectedPresetName>Init</SelectedPresetName>
          <SelectedPresetLibrary>Bundled Content</SelectedPresetLibrary>
          <SelectedPresetIsModified>true</SelectedPresetIsModified>
          <IsActive>
            <Value>1.0</Value>
            <Visualization>Device only</Visualization>
          </IsActive>
          <Volume>
            <Value>1.0</Value>
            <Visualization>Mixer and Device</Visualization>
          </Volume>
          <Panning>
            <Value>0.496233046</Value>
            <Visualization>Device only</Visualization>
          </Panning>
          <LPhaseInvert>false</LPhaseInvert>
          <RPhaseInvert>false</RPhaseInvert>
          <SmoothParameterChanges>true</SmoothParameterChanges>
        </GainerDevice>
        <KeyTrackingDevice type="KeyTrackingDevice">
          <IsMaximized>false</IsMaximized>
          <IsSelected>false</IsSelected>
          <SelectedPresetName>Init</SelectedPresetName>
          <SelectedPresetLibrary>Bundled Content</SelectedPresetLibrary>
          <SelectedPresetIsModified>true</SelectedPresetIsModified>
          <IsActive>
            <Value>1.0</Value>
            <Visualization>Device only</Visualization>
          </IsActive>
          <SrcInstrument>-1</SrcInstrument>
          <DestScaling>Linear</DestScaling>
          <KeyTrackingMode>Clamp</KeyTrackingMode>
          <KeyTrackingMin>0</KeyTrackingMin>
          <KeyTrackingMax>119</KeyTrackingMax>
          <DestTrack>
            <Value>-1</Value>
            <Visualization>Device only</Visualization>
          </DestTrack>
          <DestEffect>
            <Value>4</Value>
            <Visualization>Device only</Visualization>
          </DestEffect>
          <DestParameter>
            <Value>8</Value>
            <Visualization>Device only</Visualization>
          </DestParameter>
          <DestMin>
            <Value>0.0</Value>
            <Visualization>Device only</Visualization>
          </DestMin>
          <DestMax>
            <Value>1.0</Value>
            <Visualization>Device only</Visualization>
          </DestMax>
        </KeyTrackingDevice>
        <LfoDevice type="LfoDevice">
          <IsMaximized>false</IsMaximized>
          <IsSelected>false</IsSelected>
          <SelectedPresetName>Init</SelectedPresetName>
          <SelectedPresetLibrary>Bundled Content</SelectedPresetLibrary>
          <SelectedPresetIsModified>true</SelectedPresetIsModified>
          <IsActive>
            <Value>1.0</Value>
            <Visualization>Device only</Visualization>
          </IsActive>
          <DestTrack>
            <Value>-1</Value>
            <Visualization>Device only</Visualization>
          </DestTrack>
          <DestEffect>
            <Value>1.0</Value>
            <Visualization>Device only</Visualization>
          </DestEffect>
          <DestParameter>
            <Value>1.0</Value>
            <Visualization>Device only</Visualization>
          </DestParameter>
          <Amplitude>
            <Value>0.5</Value>
            <Visualization>Device only</Visualization>
          </Amplitude>
          <Offset>
            <Value>0.0</Value>
            <Visualization>Device only</Visualization>
          </Offset>
          <Frequency>
            <Value>9.99999997e-07</Value>
            <Visualization>Device only</Visualization>
          </Frequency>
          <Type>
            <Value>3</Value>
            <Visualization>Device only</Visualization>
          </Type>
          <CustomEnvelope>
            <PlayMode>Linear</PlayMode>
            <Length>64</Length>
            <ValueQuantum>0.0</ValueQuantum>
            <Polarity>Unipolar</Polarity>
            <Points>
              <Point>0,0.0</Point>
              <Point>63,1.0</Point>
            </Points>
          </CustomEnvelope>
          <CustomEnvelopeOneShot>true</CustomEnvelopeOneShot>
          <UseAdjustedEnvelopeLength>true</UseAdjustedEnvelopeLength>
        </LfoDevice>
      </Devices>
    </DeviceChain>
  </DeviceSlot>
</FilterDeviceClipboard>


Edited by ffx, 10 September 2018 - 11:01.

Test system: macOS 10.13.4, HFS+. Firewire Audio, i7 4770, 8GB Ram, GTX1050 2GB, 48kHz
GUI Automation RecorderNative DSP Context MenuTuned ShortcutsUnified Value Shift And Transpose | Jump To From Send Modified (Docs) | Quick Template | Nisanmol's Groove Tool FixedThemes


#2 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1837 posts
  • Gender:Not Telling

Posted 10 September 2018 - 11:33

No. The formula device doesn't have access to any pattern data. Only input parameters and what's available under "help".

 

PS. I had some fun with checking what was available in the environment table of the formula device. With a script, it's possible to use character byte to the output, and write the output of "for k, v" loop to a parameter device, character by character, then read it via a notifier :) It turned out that the debug library was available in 3.0 (removed in 3.1), but even though lots of info about the lua environment(s) is available deep inside it, I believe it wasn't possible to do much with it (like setting up a connection to the song data, for example).


  • ffx likes this

#3 Zer0 Fly

Zer0 Fly

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1257 posts
  • Gender:Not Telling
  • Location:Am Mind
  • Interests:Buddha

Posted 10 September 2018 - 17:18

No, but you already managed a very cool way that works for random panning positions.

 

I currently need distraction, so I made one similar to urs that will cylce through a table of panning values which is defined in the formula device code (just edit/add/delete values in the array to your liking). It also has a reset dial, just move/automate to reset the panning to the first slot in the table.

Attached Files


  • ffx likes this


#4 ffx

ffx

    Composes without Wires burns Directly from Brain to DVD that is already in Store Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3490 posts
  • Gender:Not Telling

Posted 10 September 2018 - 17:34

I currently need distraction, so I made one similar to urs that will cylce through a table of panning values which is defined in the formula device code (just edit/add/delete values in the array to your liking). It also has a reset dial, just move/automate to reset the panning to the first slot in the table.

 

 

Very cool, thanks.


Test system: macOS 10.13.4, HFS+. Firewire Audio, i7 4770, 8GB Ram, GTX1050 2GB, 48kHz
GUI Automation RecorderNative DSP Context MenuTuned ShortcutsUnified Value Shift And Transpose | Jump To From Send Modified (Docs) | Quick Template | Nisanmol's Groove Tool FixedThemes