Report : the Djazz improvisation software

1. PROBLEM IDENTIFICATION

  • The major issues identified porting all three versions of DJAZZ were:
  • Updated to Max8.x (which runs 64 bits). The original patches were developed and worked on Max 6.1.10 (running in 32 bits);
  • Various external objects and related libraries updated to work under Max 8.x;
  • Djazz Updated to work with the latest antescofo reference version;
  • Update of OM libraries (<bordeaux-threads> and <improtek>) to work with OM version 6.19. These libraries were running under OM 6.5.1 and
  • Adapt all the features, at least for the 11.6 OSX system (Big Sur), which only works in 64 bits.

2. PORTINGS

A first step in porting the audio (mono and stereo) and MIDI versions of DJAZZ was the organization into three separate folders. This point aims to:

  • Simplify the maintenance of different versions;
  • Clarify the dependencies of each environment;
  • Simplify problem tracking and
  • Preparing for the transition to Max “projects” folder structure

2.1. DJAZZ—MIDI

2.1.1. Folder Structure

Being, for the moment, the application that needs the fewer changes, we have kept the same folder structure as before.

2.1.2. Max

The following MAX external objects have been updated to 64-bit versions

  • bc.yinstats.mxo 
  • bonk~.mxo 
  • supervp.scrub~.mxo 
  • yin~.mxo

The patch also used the o.dot library (CNMAT - Stanford), also updated (in the/_ObjectsMidi folder) The patch works now in MAX version 8.2 The interface organization is under redesign. The next step in the porting process will be to harmonize the design of the interface with that of the audio versions.

2.1.3. Antescofo

Djazz_Midi works well with the latest version of antescofo (antescofo version ~ 1.1, 07/30/2021). The scripts being simple scores, no change was necessary.

2.2. DJAZZ — AUDIO_mono

2.2.1. Folder Structure

The folder structure has been simplified with the following configuration:

  • _externals: folder with 5 MAX, 64-bit external objects needed:
  • _Memory: folder for saving improvisation data (annotations, audio input)
  • _MidiArchivesAudio: folder for saving MID improvisation data
  • _Oracles: This folder is not currently used
  • _patchers: folder with the various “sub-patches” needed for the main patch
  • Djaaz_Audio_2021_11_30_085_St_from_084.maxpat: the main patch.
  • Scores: Score scripts for <antescofo~>.

This allows to better target the problems of each version. The end goal will be for each version to have a “Max project,” this will avoid having to change the configuration of Max’s “File Preferences” each time you use the different environments.

2.2.2. Max

A big cleanup (not finished yet, still missing the part about the interface with MIDI controllers) has been undertaken in the patch. The modularization and rewriting of several parts (signal input; signal recording; <Online>, <interface_OM_NEW>, <Marc-yin~> sub-patches; abstractions <djazz_Buffer_Stereo_01.maxpat>, <djazz_SigOnOff_dB.maxpat>, <djazz_thru. maxpat>, <djazz_voice_Player_03.maxpat>, <djazz_voice_Player_Stereo_02.maxpat>; the signal output, the possibility of panning the different voices to a stereo pan; inclusion of the possibility of recording the improvisation outputs; etc.).

The design of the patch has also been changed to provide a more readable, coherent and ergonomic interface. This part is also a work in progress.

An important point regarding the optimization of audio players. Currently they use the <supervp. scrub~>. As a first approach, we deactivated some options, which were not used in the current context of idiomatic improvisation (Jazz, pop, world music. . .), such as the option of transposition, remix and envelope invariance spectral. On the other hand, we have kept the transient detection option, which is important not to distort the timbre too much during the time expansions and compressions necessary to adjust the tempo of audio extracts. A next phase (which depends on solving some problems with the current version of antescofo) will be to substitute <supervp. scrub~> with <groove~>. This will optimize the audio rendering of the improvisations by allowing to optimize the “players” and/or to combine the audio and MIDI versions of DJAZZ into one.

2.2.3. Antescofo

The antescofo scripts have been updated to reflect the syntax changes from version 2013, 2015 to version 2021. But, due to changes in tempo tracking and synchronization algorithms, and mainly due to development strategies, the current version of antescofo (2021) presents a lack of code parts concerning the updating of variables temporal according to symbolic variables. Until these development issues were fixed, the audio versions (mono and stereo) only work properly with the 2015 (64-bit) version of antescofo, but, alas, not with the 2021 version yet. 

We are also waiting for the fix of the various problems related to this actual version (2021) of antescofo to optimize the audio “players.”

2.3. DJAZZ — AUDIO_stereo

The porting process of the stereo version is done from the DJAZZ_audio_mono version and it works satisfactorily.

2.4. OM & Libraries

Regarding the OM part, we used OM6.19. OM6.5 did not work properly on OSX 11.6.

2.4.1. <Improtek> library

2.4.1.1. Folder Structure

The first change involved the structure of the <Improtek> library. The original folder contained a duplicate (<sources-copy>) of the library’s sources.

Original Folder

Current Folder

We moved the <sources copy> folder (a copy of <sources>, supposedly a backup) to another backup folder.

2.4.1.2. Update of MIDI Common-Lisp functions

As from OM6.5 version to OM6.19 version, there has been a change in the MIDI driver, two functions were changed: (stop-player *general-player*) by (general-stop *general-player*) (load-midi-file name) by (load-midifile name)

in the file <ImprotekTutorial.lisp>

In the server startup file <StartServerMax.lisp>, the function (start-communication-max []) contained the lambda function, with two arguments (mess & host):

(lambda (mess host) (handle-messages-from-max (om-decode-msg-or-bundle mess)) nil)

was changed to have only one argument:

(lambda (mess) (handle-messages-from-max (om-decode-msg-or-bundle mess)) nil)

This change allows us to be consistent with the function definition (om-decode-msg-or-bundle mess), changed since OM6.6. For now we kept the <StartServerMax.lisp> file, and saved the file with the changes as <StartServerMax1.lisp>.

3. BREAKDOWN OF TASKS

Porting Djazz to the Big Sur system on Macintosh, with the latest versions of the environments used (Max/MSP, OpenMusic, Antescofo) is part of a set of tasks aiming to make Djazz operational on current machines, optimizing it and to improve its functionalities, with a view to distributing it free of charge if possible during 2022.

As mentioned above, the versions of Djazz (MIDI, mono and stereo audio) ported to Big Sur are nearly operational. They work with a unified version of Antescofo which is the 2015 version. The Antescofo 2021 version is currently only compatible with Djazz MIDI, but not with Djazz audio due to a bug that was reported above. There are two options to combine the finalization of the port and the improvements or optimizations of Djazz as planned in the initial specification:

  • include some improvements in the current version of Big Sur with Antescofo 2015 to make them available quickly (but these improvements may have to be modified later after Antescofo 2015 will be discontinued)
  • wait for a rebuild of the Max patch and a long-term solution for Antescofo which will make it possible to obtain a permanent version

Regarding Antescofo :

  • a new version of Antescofo is in discussion with Jean-Louis Giavitto to solve the reported problem
  • we are also studying the possibility of creating an ad hoc tap tempo object in Max that would make it possible not to use Antescofo anymore (because Djazz only needs a small part of Antescofo’s features)

Here is the work breakdown initially planned and its connection with the portage:

  • Task 1 : test and, if necessary, run the Djazz environment as is in Big Sur
  • Task 2 : get Djazz working with the actual maintained reference version of Antescofo. 

These two first tasks were performed as described above, but with the 2015 version of Antescofo.

  • Task 3 : optimize the Djazz audio version. Some optimizations have been made, as seen above, but the next step will be to replace <svp.scrub> Max object with a less resource-intensive one like <groove~> or <wave~>.
  • Task 4 : review and optimize the recombination algorithm in Lisp. Improvement of the Lisp code can be done in parallel with the of the Max patch rebuilt, starting by describing the algorithms used in a common language. This step will also make it possible to consider future reprogramming of these algorithms in Python.
  • Task 5 : debugging and reorganization of some parts of the Max patch. This part requires rebuilding the Max patch. Among the things to change in the structure of the patch is the inclusion of a special layer to handle external controllers (the currently used Launchpad mini, MIDI controller, might become obsolete).
  • Task 6 : Think in a common solution To share the pulsation between the MIDI and audio patches. In order to achieve this task, cleaning the MIDI patch must be done (as it was for the audio). Once this step has been completed, it would be possible, if it is not too much work, to combine the audio and MIDI patches into a single one, before a complete reconstruction of the Max patch involving a change of the audio engine. It requires intensive testing to check CPU usage, in the Max status window and using Activity Monitor Apple software to complete the monitoring.
  • Task 7 : automatic learning of scratch functions (loop, acceleration). This task consists in making a scratch effect generator based on an automatic learning mechanism of the successions of buttons used on the Launchpad. This would provide a sort of “keyboard suggestion” device that semi-autonomously supports manipulations on the Launchpad. It is clear that this task should be considered after the Max patch has been rebuilt, but it can be considered now, as a specification, to be perhaps included in testing prototypes.
  • Task 8 : rebuilding Djazz from DYCI2. See with Jérôme Nika and Joakim Borg the development of a kernel to implement all the improvisation software.

4. DELIVERABLES

4.1. DJAZZ—MIDI

4.2. DJAZZ — AUDIO_Mono

4.3. DJAZZ — AUDIO_Stereo

4.4. OM & Libraries

4.4.1. <Improtek> library

 


merci/deliverables/ak.2/djazz.txt · Dernière modification: 2022/02/04 11:56 par Mikhail Malt