Month: June 2018

The DN-2000F interface library

The library exposes the following functions:

Start-up:

Init(char *ComPort)
Configures the serial port the RC-35B is connected to.

SetPitchChangeCallback(PitchChangeCallback handler)
Register the callback code for when the pitch changes. This gets called for pitch slider changes and pitch bend.

SetTimeModeCallback(TimeModeCallback handler)
Register the callback code when the TIME button is pressed.

SetPlayPauseCallback(PlayPauseCallback handler)
Register the callback code when the PLAY/PAUSE button is pressed.

SetCueCallback(CueCallback handler)
Register the callback code when the CUE button is pressed.

SetSearchCallback(SearchCallback handler)
Register the callback code when the SEARCH << or >> buttons are pressed.

SetScanCallback(SearchCallback handler)
Register the callback code when the SEARCH << or >> buttons are held down for a period.

Operation:

Load(byte Deck, byte DurationMinutes, byte DurationSeconds, byte DurationFrames)
Sends the track duration to the deck.

UpdateTime(byte Deck, byte Minute, byte Second, byte Frame, bool IsCued, bool IsPaused, bool IsPlaying)
Updates the time display on the deck.

Play(byte Deck)
Puts the deck status in play mode.

Pause(byte Deck)
Puts the deck status in pause mode.

UpdateTimeMode(byte Deck, byte Mode)
Changes the time mode (elapsed or remain) for the deck.

Cue(byte Deck, byte Minute, byte Second, byte Frame)
Puts the deck status in to cue mode.

 

The following types are used for the callbacks:

In all cases, Deck refers to the deck number – either 1 or 2.

void PitchChangeCallback(byte Deck, float PitchPercent)
PitchPercent is the new pitch value in percent, e.g. 4.2%.

void TimeModeCallback(byte Deck, byte TimeMode)
TimeMode is the new selected mode either 1 for Elapsed, or 2 for Remain.

void PlayPauseCallback(byte Deck)

void CueCallback(byte Deck)

void SearchCallback(byte Deck, byte Direction, byte Speed)
Direction is either 1 for forward, or 2 for backward. The speed starts off at 1 and increases the longer the SEARCH button is held. If the SEARCH button is held long enough it switches to Scan.

void ScanCallback(byte Deck, byte Direction, byte Speed)
Direction is either 1 for forward, or 2 for backward. The speed starts off at 1 and increases the longer the SEARCH button is held.

 

Typical use:

  1. Assign callbacks for the events.
  2. Call the Init() function passing in the COM port name.
  3. Prepare playback by calling Load() passing in the track duration.
  4. Operate the RC-35B.

 

A full demo using the Un4seen BASS Audio Library can be found on the SourceForge page: https://sourceforge.net/projects/denon-dn-interface

Interface code now available

I’ve added my Denon DN-2000F interface code to SourceForge:

https://sourceforge.net/projects/denon-dn-interface/

The interface is in the form of a DLL/shared library which exposes functions and callbacks.

At the moment, only Windows is supported. Linux and macOS will follow shortly.

There’s a .NET demo app which shows the interface in action, and it allows you to use both decks on the RC-35B to control the playback of an audio file. The .NET app uses the amazing Un4seen BASS Audio Library for the playback.

See it in action: https://youtu.be/nZoMyLBqc3w

 

Documentation to follow!