я потому спросил, что вот же кучу лет не могу подружить левую готовую клавиатуру баяна Ефимова с электробаяном роланд FR3X - нужен очень хитрый скрипт между ними..)
				
			А если экспортировать семплы, собрать свой инструмент и если надо скрипт? Думаю там всё схематично по семплам. Вобще мне Native Instruments Accordions 2 больше нравится, Ефимовский я не распаковывал. А вот из Accordions 2 я вынул все семплы левой руки и закачал в MODXя потому спросил, что вот же кучу лет не могу подружить левую готовую клавиатуру баяна Ефимова с электробаяном роланд FR3X - нужен очень хитрый скрипт между ними..)

Напишите чуть более подробно, я новичок, нибумбум. Вот скрипт с аккордами, но там всё идёт на графический объектЕсли получается распознавать аккорд (что нетривиально),
Хотя бы два аккорда направить на клавиатуру, Мажор/Минор, чтобы реально ноты нажимались C1 и C2 (не аккорд, а нота)Если получается распознавать аккорд (что нетривиально),

on init
message("")
set_script_title("Chord")
set_ui_height(2)
declare !chord_names[2]
!chord_names[0] := "Maj"
!chord_names[4] := "min"
declare %chord_types[2*4] := (...
4, 7, 0, 0,...
3, 7, 0, 0)
declare $chord_types
end on
on note
if ($chord_types #5)
play_note($EVENT_NOTE,$EVENT_VELOCITY,0,-1)
else
play_note($EVENT_NOTE + 12,$EVENT_VELOCITY,0,-1)
end if
end on
 
					
				Это как "немаловероятно", я чесно говоря не сразу понял, что вопрос-то непростой как кажется.Если получается распознавать аккорд (что нетривиально),
define MAX_CHORD_NOTES := 3      // Three note chord detection
define OCTAVE := 12     // According to this script, the minor loop samples are placed on the second lowest octaveon note открываем «окно» (допустим, $window_opened := 1) и запускаем счётчик (wait(1500-3000)).%NOTE_HELD) ноты в массив.on note опять запускаем счётчик.on init
  message("")
  make_perfview
  set_ui_height(4)
  declare ui_value_edit $Chrd_Wait(1, 100, 1)
  declare $i
  declare $note_counter := 0
  declare %note_array[3]
  declare $new_ncb
  declare %intervals[2]
  declare !note_name[12]
  !note_name[0] := "C "
  !note_name[1] := "Db"
  !note_name[2] := "D "
  !note_name[3] := "Eb"
  !note_name[4] := "E "
  !note_name[5] := "F "
  !note_name[6] := "Gb"
  !note_name[7] := "G "
  !note_name[8] := "Ab"
  !note_name[9] := "A "
  !note_name[10] := "Bb"
  !note_name[11] := "B "
  $Chrd_Wait := 50
end on
on note
  ignore_event($EVENT_ID)
  message("")
  $new_ncb := $NI_CALLBACK_ID
  $i := 0
  $note_counter := 0
  while ($i<12 and ($note_counter<3))
    if (%KEY_DOWN_OCT[$i]=1)
      %note_array[$note_counter] := $i
      inc($note_counter)
    end if
    inc($i)
  end while
  wait($Chrd_Wait)
  if ($new_ncb=$NI_CALLBACK_ID and ($note_counter=3))
    sort(%note_array,0)
    $i := 0
    while ($i<2)
      %intervals[$i] := %note_array[$i+1]-%note_array[$i]
      inc($i)
    end while
    select (%intervals[0])
      case 3
        select (%intervals[1])
          case 5
            play_note(%note_array[2],$EVENT_VELOCITY,0,-1)
            message(!note_name[%note_array[2]] & " | major chord")
          case 4
            play_note(12+%note_array[0],$EVENT_VELOCITY,0,-1)
            message(!note_name[%note_array[0]] & " | minor chord")
        end select
      case 4
        select (%intervals[1])
          case 3
            play_note(%note_array[0],$EVENT_VELOCITY,0,-1)
            message(!note_name[%note_array[0]] & " | major chord")
          case 5
            play_note(12+%note_array[2],$EVENT_VELOCITY,0,-1)
            message(!note_name[%note_array[2]] & " | minor chord")
        end select
      case 5
        select (%intervals[1])
          case 4
            play_note(%note_array[1],$EVENT_VELOCITY,0,-1)
            message(!note_name[%note_array[1]] & " | major chord")
          case 3
            play_note(12+%note_array[1],$EVENT_VELOCITY,0,-1)
            message(!note_name[%note_array[1]] & " | minor chord")
        end select
    end select
  end if
end onon init
declare ui_label $chord_name(2, 1) {{{{{Note + mode{{{}
declare ui_button $start
declare !note_names[12]
!note_names[0] := "C"
!note_names[1] := "C#"
!note_names[2] := "D"
!note_names[3] := "D#"
!note_names[4] := "E"
!note_names[5] := "F"
!note_names[6] := "F#"
!note_names[7] := "G"
!note_names[8] := "G#"
!note_names[9] := "A"
!note_names[10] := "A#"
!note_names[11] := "B"
declare $do
declare $dom
declare $i
declare $j
declare const $NUM_CHORDS := 5
declare %chords[$NUM_CHORDS*12]
$i := 0
while ($i<=11)
declare %_notes[4]
%_notes[0] := ($i+0) mod 12
%_notes[1] := ($i+4) mod 12
%_notes[2] := ($i+7) mod 12
%_notes[3] := -1 mod 12
sort(%_notes,0)
%chords[0*12+$i] := sh_left(%_notes[0],0)+sh_left(%_notes[1],4)+sh_left(%_notes[2],8)+sh_left(%_notes[3],12)
%_notes[0] := ($i+0) mod 12
%_notes[1] := ($i+3) mod 12
%_notes[2] := ($i+7) mod 12
%_notes[3] := -1 mod 12
sort(%_notes,0)
%chords[1*12+$i] := sh_left(%_notes[0],0)+sh_left(%_notes[1],4)+sh_left(%_notes[2],8)+sh_left(%_notes[3],12)
%_notes[0] := ($i+0) mod 12
%_notes[1] := ($i+2) mod 12
%_notes[2] := ($i+7) mod 12
%_notes[3] := -1 mod 12
sort(%_notes,0)
%chords[2*12+$i] := sh_left(%_notes[0],0)+sh_left(%_notes[1],4)+sh_left(%_notes[2],8)+sh_left(%_notes[3],12)
%_notes[0] := ($i+0) mod 12
%_notes[1] := ($i+4) mod 12
%_notes[2] := ($i+7) mod 12
%_notes[3] := ($i+10) mod 12
sort(%_notes,0)
%chords[3*12+$i] := sh_left(%_notes[0],0)+sh_left(%_notes[1],4)+sh_left(%_notes[2],8)+sh_left(%_notes[3],12)
%_notes[0] := ($i+0) mod 12
%_notes[1] := ($i+4) mod 12
%_notes[2] := ($i+7) mod 12
%_notes[3] := ($i+11) mod 12
sort(%_notes,0)
%chords[4*12+$i] := sh_left(%_notes[0],0)+sh_left(%_notes[1],4)+sh_left(%_notes[2],8)+sh_left(%_notes[3],12)
inc($i)
end while
declare !chord_names[$NUM_CHORDS]
!chord_names[0] := ""
!chord_names[1] := "m"
!chord_names[2] := " sus2"
!chord_names[3] := "7"
!chord_names[4] := " maj7"
declare $played_chord
declare %played_notes[12]
end on
on note
ignore_event($EVENT_NOTE)
ignore_event($EVENT_ID)
$i := 0
while ($i<num_elements(%played_notes))
%played_notes[$i] := -1
inc($i)
end while
$j := 0
$i := 0
while ($i<=11)
if (%KEY_DOWN_OCT[$i]=1)
%played_notes[$j] := $i
inc($j)
end if
inc($i)
end while
%_notes[0] := %played_notes[0] mod 12
%_notes[1] := %played_notes[1] mod 12
%_notes[2] := %played_notes[2] mod 12
%_notes[3] := %played_notes[3] mod 12
sort(%_notes,0)
$played_chord := sh_left(%_notes[0],0)+sh_left(%_notes[1],4)+sh_left(%_notes[2],8)+sh_left(%_notes[3],12)
$played_chord := search(%chords,$played_chord)
%_notes[0] := %played_notes[0] mod 12
%_notes[1] := %played_notes[1] mod 12
%_notes[2] := %played_notes[2] mod 12
%_notes[3] := %played_notes[3] mod 12
sort(%_notes,0)
if ($played_chord # -1)
set_text($chord_name,!note_names[$played_chord mod 12] & !chord_names[$played_chord/12])
else
set_text($chord_name,"")
end if
if ($played_chord mod 12 >= 0 and $played_chord/12 = 0 )
$do := play_note(0,$EVENT_VELOCITY,0,-1){{{{{{{{{{{{{{Loop Major}
change_tune($do,$played_chord mod 12 * 100000,0){{{{{{{{{{{{{Pitch Bend}
else
if ($played_chord/12 = 1)
$do := play_note(24,$EVENT_VELOCITY,0,-1) {{{{{{{{{{{Loop Minor}
change_tune($do,$played_chord mod 12 * 100000,0) {{{{{{{{{{{{{Pitch Bend}
end if
end if
end on

on init
  declare const none := -1
  declare const chord_major := 24 + 12*2 
  declare const chord_minor := 24 + 12*3
  declare const chord_7     := 24 + 12*4
 
  declare current_chord := none
  declare new_chord
  declare base_note
  declare velocity[128]
  declare id
end on
function find_chord(base_note, chord)
  declare n
  chord := none
  for n := 0 to 11
    if KEY_DOWN_OCT[n] = 1 and KEY_DOWN_OCT[(n + 4) mod 12] = 1 and KEY_DOWN_OCT[(n + 7) mod 12] = 1
      base_note := n
      chord := chord_major
    end if
    if KEY_DOWN_OCT[n] = 1 and KEY_DOWN_OCT[(n + 3) mod 12] = 1 and KEY_DOWN_OCT[(n + 7) mod 12] = 1
      base_note := n
      chord := chord_minor
    end if
    if KEY_DOWN_OCT[n] = 1 and KEY_DOWN_OCT[(n + 10) mod 12] = 1
      base_note := n
      chord := chord_7
    end if
  end for 
end function
function maybe_change_chord
  { find the played chord }
  find_chord(base_note, new_chord)
 
  { if it's different from the current chord }
  if new_chord # current_chord
    { turn of previously played chord }
    note_off(id)
    current_chord := new_chord
    
    { play new chord }
    if new_chord # none     
      id := play_note(new_chord + base_note, velocity[base_note], 0, 0)     
    end if
  end if 
end function
on note 
  { save last used velocity for this note }
  velocity[EVENT_NOTE] := EVENT_VELOCITY
 
  { don't let the incoming note through to playback }
  ignore_event(EVENT_ID)
 
  { check for chord change }
  maybe_change_chord
end on
on release
  { check for chord change }
  maybe_change_chord
end on
если б там было так просто, давно бы уже назначил..))По идее, за вечер можно сварганить.
А как можно красиво детюнить аккордеон? Мне кажется French Musette из контактовских библиотек недостаточно расстроен.я потому спросил, что вот же кучу лет не могу подружить левую готовую клавиатуру баяна Ефимова с электробаяном роланд FR3X - нужен очень хитрый скрипт между ними..)



Можете взять FM8, поставить два синуса, один — на 440, другой — на 442 и приятно удивиться)трясёт же всёвремя исполнитель мех
Ну в синтах GUI для пользователя\композитора. В Kontakt — для «разработчика»... Жить от этого легче не становится, учитывая прожорливость контакта...В синтах наверное какой-то алгоритм предусмотрен для этих целей.
on init
  set_script_title("Copy CC# to another Ch.")
  declare ui_value_edit $CC_num1(-1, 127, 1)
  set_text($CC_num1,"Orig CC#")
  declare ui_value_edit $Copy_Ch1(1, 16, 1)
  set_text($Copy_Ch1,"Copy to Ch.")
  declare ui_value_edit $CC_num2(-1, 127, 1)
  set_text($CC_num2,"Orig CC#")
  declare ui_value_edit $Copy_Ch2(1, 16, 1)
  set_text($Copy_Ch2,"Copy to Ch.")
  make_persistent($CC_num1)
  make_persistent($Copy_Ch1)
  make_persistent($CC_num2)
  make_persistent($Copy_Ch2)
  move_control($CC_num1,1,1)
  move_control($Copy_Ch1,2,1)
  move_control($CC_num2,4,1)
  move_control($Copy_Ch2,5,1)
end on
on midi_in
  if ($MIDI_COMMAND=$MIDI_COMMAND_CC and ($MIDI_BYTE_1=$CC_num1))
  set_midi($Copy_Ch1-1,$MIDI_COMMAND,$MIDI_BYTE_1,$MIDI_BYTE_2)
  end if
  if ($MIDI_COMMAND=$MIDI_COMMAND_CC and ($MIDI_BYTE_1=$CC_num2))
  set_midi($Copy_Ch2-1,$MIDI_COMMAND,$MIDI_BYTE_1,$MIDI_BYTE_2)
  end if
end on< 16, а < 64.on init
  set_script_title("Copy CC# to all Ch.")
  declare ui_value_edit $CC_num1(-1, 127, 1)
  set_text($CC_num1,"Orig CC#")
  make_persistent($CC_num1)
  move_control($CC_num1,1,1)
  declare $i := 0
end on
on midi_in
  $i := 0
  while ($i < 16)
      if ($MIDI_COMMAND=$MIDI_COMMAND_CC and $MIDI_BYTE_1=$CC_num1)
          set_midi($i,$MIDI_COMMAND,$MIDI_BYTE_1,$MIDI_BYTE_2)
      end if
  end while
end onЭто я понимаю, но мне это нужно для управления позициями микрофонов, я пользуюсь отдельными патчами на каждую артикуляцию и приходится каждый раз что бы покрутить позиции включать твой ремапер и включать клонирование.Но вообще такой DDOS сообщениями CC — плохая практика, потому что ты это ощутишь на производительности: все инструменты, включая те, которые не делают ничего — начнут что-то делать постоянно. Крутилки двигать, LFO пересчитывать и т.п.
 github.com
						
					
					github.com
				@Sunshineman,
Код:on init set_script_title("Copy CC# to all Ch.") declare ui_value_edit $CC_num1(-1, 127, 1) set_text($CC_num1,"Orig CC#") make_persistent($CC_num1) move_control($CC_num1,1,1) declare $i := 0 end on on midi_in $i := 0 while ($i < 16) if ($MIDI_COMMAND=$MIDI_COMMAND_CC and $MIDI_BYTE_1=$CC_num1) set_midi($i,$MIDI_COMMAND,$MIDI_BYTE_1,$MIDI_BYTE_2) end if end while end on
Да, но не только они, вообще для любых библиотек с множеством патчей и микрофонных позиций.@Sunshineman, Orchestraltools?
Я верю, что здесь есть готовое решение (на Goggle Drive есть мульти контакта)
GitHub - Levitanus/reaticulate-banks: banks for reaticulate extension of Reaper
banks for reaticulate extension of Reaper. Contribute to Levitanus/reaticulate-banks development by creating an account on GitHub.github.com
Я ещё не смотрел как у тебя там устроено, но понял из твоих слов, что нужно лезть в мультискрипт чтобы рулить позиции микро.@Sunshineman, в Berlin Brass точно есть.
Я, кажется, с тех пор, как завёл этот репозиторий, ничего особо не трогал. Там по умолчанию должны быть включены Tree. А через мульти-скрипт переключаться на другие позиции.
В папке Effects на GitHub есть OT Midi mapper — JSFX для переключения позиций перед рендером.
Но, во-первых, там всё намертво прибито к OrchestralTools, во-вторых, я столкнулся с проблемой, что при переключении позиции весь purge слетает, и, пока проект рендерится в новой позиции — оперативка успевает забиться до предела, и всё падает. В общем, мне оказалось экономнее в итоге сразу по-джентельменски на разные каналы вывести Tree и Close и запуржить
 
	