LinJam Notes
DONE:
- [#52] implement global app config
- [#54] design client config GUI feature
- [#56] design audio config GUI feature
- [#57] design subscriptions config GUI feature
- GUI has three tabs - one each for client , audio , subscriptions nodes
- added ConfigClient , ConfigNinjam , ConfigAudio , ConfigSubscriptions GUIs
- added add and config btns to Channel for semantics (mutex overlapping w/ expand btn)
- renamed ChannelConfig to ConfigChannel
- removed remaining LinJamConfig Value holders (issue #33) except isAgreed (issue #14)
- removed LinJamConfig::getNode() , getLeaf() methods
- removed LinJamConfig::getClient() , getAudio() , getServer() methods
- [#58] implement subscriptions config feature
- implemented the intrinsic subscriptions/ignore feature
- added LinJam::ConfigureSubscriptions() method
- added LinJam::UpdateRemoteUserState() method
- added NJClient::MAX_USERNAME_LEN , MAX_CHANNELNAME_LEN constants
- added NJClient::ConnectionStatus , SubscribeMode , SaveMultitrack , SaveMixdown enums
- added NJClient::GetLocalChannelName() convienence method
- added Subscriptions and Subscription GUI classes
- implemented LinJamConfig::valueTreeChildAdded() , valueTreeChildRemoved() methods
- removed Channel::renameChannel() method
- [#55] implement client config feature
- added NJClient::DebugLevel enum
- added many audio config constants
- added CONFIG::MIXDOWN_MODE_* xml params and constants
-
[#12] implement audio config feature
-
12 hook up audio config GUI to storage
- added juce audio modules
- added juce audio device types constants
- added CONFIG::MAC_DEVICE_ID , ALSA_CONFIG_ID xml params and constants
- added CONFIG::DEFAULT_MAC_DEVICE , DEFAULT_ALSA_CONFIG constants
-
12 hook Config GUI to trigger on LinJam::IsAudioEnabled value holder
- added LinJam::HandleTimer() method
- removed LinJam::HandleChatCommand() method
- removed LinJam::IsInitialized class var
- changed LinJam::IsAudioEnabled to value holder for Config GUI
- added LinJam::ConfigDismissed() method
- added NJC_STATUS_AUDIOERROR to NJClient::ConnectionStatus enum
- removed LinJamApplication::getContainerComponent() , getChildComponent() methods
- renamed ConfigClient class to Config
- renamed ConfigNinjam class to ConfigClient
- removed GUI::UNKNOWN_STATUS_TEXT
- moved configButton from MasterChannels to MainContent
- added GUI::CONFIG_BTN_X , CONFIG_BTN_Y constants
- renamed GUI::CONFIG_BTN_XC , CONFIG_BTN_YC constants to GUI::HOVER_BTN_XC , HOVER_BTN_YC
- removed juce audio modules
- removed juce audio device types constants
- removed ConfigAudio::queryDevices()
- added ConfigAudio::queryDirectsoundDevices() , queryCoreaudioDevices() methods
-
12 implement audio config feature
- removed LinJamApplication::startTimers()
- added LinJam::LinJamStatus enum (extension to NJClient::ConnectionStatus)
- removed NJC_STATUS_AUDIOERROR from NJClient::ConnectionStatus enum
- added LinJam::ConfigPending() method
- changed LinJam::Status to value holder
- added LinJam::UpdateStatus() method
- LinJam::HandleStatusChanged() now fires async via LinJam::Status to value holder
- added ConfigAudio::enableComponents() method
- added JACK_SERVER config xml param and constant
- renamed all FreeInputChannel vars and methods to FreeAudioSource in LinJam and ConfigChannel classes
- renamed LinJam::GetNumInputChannels() method to GetNumAudioSources()
- added LinJam::GetNumLocalChannels() method
-
[#33] prune unneeded LinJamConfig instance vars
-
[#33] some config refactoring (closes [#33])
- added version number to config
- refactored LinJamConfig::sanitizeConfig() to accomodate attributes on list nodes
- removed session_dir and log_file from persistent config
- simplified LinJam::IsAgreed() by checking Config->server[CONFIG::IS_AGREED_ID] only
preset in LinJamConfig::setCurrentServer()
- removed LinJamConfig::getCurrentServer(), LinJamConfig::setServerShouldAgree(), LinJamConfig::getOrAddServer()
-
[#62] address demeter and visibility issues
- gave all configStore vars meaningful names
- passed <server> storage node into License and Login</server>
- revoke friend status for License in LinJam
- renamed LinJamConfig::setCurrentServer() to LinJamConfig::setCredentials()
- added LinJamConfig::getCredentials() (deep copy) exposed via LinJam::getCredentials() wrapper
- made LinJamConfig::setServer() and LinJamConfig::getServer() private
- moved Login::preloadState() functionality into its only caller Login::broughtToFront()
- added Login::setConfig() method
- added LinJam::RetryLogin counter
(along with removing the bits in LinJam::HandleStatusChanged() and Login::preloadState()
that reset IsAgreed Value after failed login - this also fixes the minor annoyances
where login sometimes fails and license prompt is reshown)
- added LinJam::SignIn() which encapsulates setting RetryLogin counter setCredentials() and Connect()
- fixed also LINJAM_STATUS_ROOMFULL clobbering LINJAM_STATUS_CONFIGPENDING
- moved functionalities of LinJamConfig::ParseUsername() and LinJamConfig::filteredName()
into their only caller LinJamConfig::makeUserId()
- renamed LinJamConfig::destroyChannel() to LinJamConfig::removeChannel()
- renamed LinJamConfig::sanityCheck() to LinJamConfig::validateConfig()
- renamed LinJamConfig::isConfigSane() to LinJamConfig::isConfigValid()
- renamed LinJamConfig::configValueTree to LinJamConfig::configRoot
- declared friend status for LinJam in LinJamConfig
- made static
- LinJamConfig::MakeHostId()
- LinJamConfig::MakeUserId()
- LinJamConfig::MakeChannelId()
- LinJamConfig::MakeStereoName()
- LinJamConfig::ParseStereoStatus()
-
made private
- LinJamConfig::isConfigSane()
- LinJamConfig::setStereo()
- LinJamConfig::setRemoteStereo()
- LinJamConfig::addocalChannel()
- LinJamConfig::removeLocalChannel()
- LinJamConfig::getOrAddRemoteUser()
- LinJamConfig::getOrAddRemoteChannel()
- LinJamConfig::getUserById()
- LinJamConfig::getChannelById()
- LinJamConfig::getChannelByIdx()
- LinJamConfig::getChannelByPairIdx()
- LinJamConfig::getChannelByName()
- LinJamConfig::getUserMasterChannel()
- LinJamConfig::setCredentials()
- LinJamConfig::getCredentials()
-
[#64] make recording time query more robust
- promoted NETWORK namespace to class
- re-implemented KNOWN_BOTS and KNOWN_BOTS Arrays as XmlElements
- removed NETWORK::known_hosts , NETWORK::known_bots C-arrays
- removed NETWORK::N_KNOWN_HOSTS, NETWORK::N_KNOWN_BOTS constants
- added NETWORK::Initialize() and NETWORK::IsKnownHost() methods
- added LinJam::InitializeConstants() method
-
added BOT_NAME_ and BOT_USERIDX_ xml params and constants
-
[#65] address ugly ALSA config char*
- call overridden create_audioStreamer_ALSA() with explicit args
-
renamed Loop::updateBeat() to Loop::updateBeatN()
-
set SessionDir and logFile to standard OS user appdata location
- set SessionDir and logFile to be children of JUCE userApplicationDataDirecto
- commented out LinJam::CleanSessionDir() - will perhaps make a button for this
- changed is_stereo local vars for remotes to is_pannable per NJClient semant
- all NJClient and LinJam channels are mono
- all NJClient references to 'is_stereo' simply mean 'is_pannable'
- all LinJam channels are pannable and this value is hard coded 'true'
-
set loop progress to full when disconnected (strobe)
-
[#12] make DS devices configurable
- call re-written njasiodrv_create_asio_streamer with explicit args
(renamed NewASIO())
- removed LinJam::IsAudioEnabled (Config GUI now listens on LinJam::Status)
- removed LinJam::ConfigPending and LinJam::ConfigDismissed
- added Value linjam_state param to MainContent::InitializeAudioConfig()
and Config and ConfigAudio constructors
- added Value MainContent::linjamState, Config::linjamState, ConfigAudio::linjamState
- added buffer latency calculation to dialog (ConfigAudio::updateLatency())
- added ConfigAudio::getItemIndex() (actually for general combobox)
- stores only DS device name instead of guid bits
- remvoed CONFIG::DS_INPUT_, CONFIG::DS_OUTPUT_,
CONFIG::DEFAULT_DS_INPUT, CONFIG::DEFAULT_DS_OUTPUT
_KEY and _ID constants pairs and xml params for * in [0,1,2,3]
- added CONFIG::DEFAULT_DS_INPUT, CONFIG::DEFAULT_DS_OUTPUT constants
and CONFIG::DS_INPUT_, CONFIG::DS_OUTPUT_
_KEY and _ID constants pairs and xml params
- removed CONFIG::ALSA_CONFIG_, CONFIG::DEFAULT_ALSA_CONFIG
_KEY and _ID constants pairs and xml params
- added CONFIG::DEFAULT_ALSA_INPUT, CONFIG::DEFAULT_ALSA_OUTPUT,
CONFIG::DEFAULT_ALSA_NCHANNELS, CONFIG::DEFAULT_ALSA_SAMPLERATE,
CONFIG::DEFAULT_ALSA_BITDEPTH, CONFIG::DEFAULT_ALSA_NBLOCKS,
CONFIG::DEFAULT_ALSA_BLOCKSIZE
_KEY and _ID constants pairs and xml params
- added LinJam::Timer pointer for access to main multi-timer
- added LinJam::ConfigureAudio() to defer audio init via new timer
- moved LinJam::updateRemoteUserState() into LinJamConfig
- moved ConfigAudio::broughtToFront() functionality into ConfigAudio::valueChanged(LinJam::Status)
- added LinJam::AutoJoinHost string and Login::quickLogin() method (issue [#9] - nyi)
- added LinJamConfig::dataDir File reference (CLIENT::STORAGE_DIRNAME)
- renamed PERSISTENCE_ constants to STORAGE_
[#12] make alsa devices configurable ( closes [#12] )
* fledged out remaining ALSA and CA instantiation/configuration
* moved most ConfigAudio related constants into GUI namespace
* renamed ConfigAudio::modeCombobox to ConfigAudio::apiCombobox
* renamed ConfigAudio::nixConfigLabel and ConfigAudio::nixConfigText
to ConfigAudio::jackNameLabel and ConfigAudio::jackNameText
because ConfigAudio::nixConfigLabel is no longer mutable because ALSA config_string has been eliminated
instead ConfigAudio::nSourcesLabel is mutable to accomodate mac_n_channels and alsa_n_channels
* removed GUI::JACK_NAME_LABEL_TEXT and GUI::ALSA_CONFIG_LABEL_TEXT
* added GUI::NSOURCES_LABEL_TEXT and GUI::NCHANNELS_LABEL_TEXT
* made new ConfigGui Config tab (issues [#52] and [#68])
* comboboxes for font size (issue #38 nyi) and gui update ivl (issue #67 nyi)
* changed GUI_UPDATE_IVL_HI constant to array GUI_UPDATE_IVLS_HI
* added FONT_SIZE_ and UPDATE_IVL_ _KEY and _ID constants pairs and xml params
* added CONFIG::DEFAULT_FONT_SIZE and CONFIG::DEFAULT_UPDATE_IVL_N constants
* added GUI::FONT_SIZES and GUI::UPDATE_IVLS constantsfor combobox population
* added Value linjamState to Config and made it Value::Listener
* made a button for LinJam::CleanSessionDir() on ConfigClient tab
* renamed *SUBSCRIPTIONS* and *subscriptions* to *BLACKLIST* and *blacklist*
* added GUI::SAVE_MODES and GUI::DEBUG_LEVELS constants for combobox population
* added several GUI::*_COLOR constants for config screen
* moved the LinJamStatus enum out to global constants STATUS namespace
* made License a ValueListener on always_agreed (issue [#70])
[#67] implement user-configurable gui update speed
* trimmed stereo postfix on channel name displays
* renamed and promoted STATUS namespace to APP class
* replaced NETWORK::Initialize() with APP::Initialize()
* removed LinJam::InitializeConstants()
* renamed NETWORK::URL_CHARS to NETWORK::HOST_CHARS
* renamed LinJam::ComputeStereoPan() to LinJam::ClientPan()
[#38] implement user-configurable font size
* implemented right-click copy/paste menu to chat and chat entry
* corrected font and selection color issues
* added Value Chat::fontSize and Value font_size to Chat constuctor
* replaced ValueTree License::loginStore with Value License::isAgreed
* added Value License::isAgreed and Value License::alwaysAgree vars
and added Value is_agreed and Value always_agree to License constuctor
* remvoed License::setConfig() method
* replaced MainContent::instantiateLogin(), MainContent::instantiateMixer(),
MainContent::instantiateConfig() with MainContent::instantiate()
* added several contstants for chat screen positioning, borders, and colors
* added BORDER_PX, BORDER2_PX,BORDER_RADIUS,BORDER_L[0..4]_COLOR,
BACKGROUND_L[0..4]_COLOR, PAD[1..5], PAD[1..5]F TEXT_EMPTY_COLOR,
TEXT_NORMAL_COLOR, TEXT_HILITE_COLOR, TEXT_HILITEBG_COLOR,
TEXT_CARET_COLOR, TOPIC_BORDER_X, TOPIC_BORDER_Y,
TOPIC_BORDER_PADW, TOPIC_BORDER_H, TOPIC_X, TOPIC_PADW, TOPIC_PADH,
TOPIC_Y, TOPIC_TEXT_COLOR, TOPIC_FONT_H, TOPIC_H,
CHAT_PANE_BORDER_X, CHAT_PANE_BORDER_Y, CHAT_BORDER_X,
CHAT_BORDER_Y, CHAT_BORDER_PADW, CHAT_X, CHAT_Y, CHAT_WITH_TOPIC_Y,
CHAT_PADW, CHAT_PADH, CHAT_ENTRY_PADY, CHAT_ENTRY_PADH,
CHAT_PROMPT_TEXT, CHAT_TEXT_COLOR, CHAT_OUTLINE_COLOR,
CHAT_FOCUS_COLOR, CHAT_SHADOW_COLOR, CHAT_TEXT_BG_COLOR constants
* added TraceChat.h
[#61] validate/sanitize GUI config store
* added LinJamConfig::sanitizeGui()
* minor de-linting
* added UNUSED() macro to JuceLibraryCode/AppConfig.h
* added NETWORK::NICK_CHARS
CURRENT:
TODO:
BUGS:
- remote channel controls get confused when idx's change (issue [#31]) ? maybe fixed (981de25)
-
re: unicode assertion failures (spackled for now)
Phil_D - unicode in chat - JUCE Assertion failure in juce_TextEditor.cpp:535
Bilos - channel name string assertion failure Strat.ø¤º°*°º¤ø,
also if unicode is present in the room topic gNinjam will crash on join
rails/pg also do not like this encoding
UPDATE "servers" SET "topic" = '''Am Dm7 Am G#�Am G F Dsus4 Esus4 (oYo) ''', "bpm" = 92, "bpi" = 48, "updated_at" = '2015-03-10 05:23:08.618965' WHERE "servers"."id" = 11):
ActiveRecord::StatementInvalid (PG::Error: ERROR: invalid byte sequence for encoding "UTF8": 0xb0
the fix for rails required a guess as to the input encoding for translation
in this case 'ISO-8859-1' (0xb0 is ISO-8859-1 'degrees' char which is unicode 0x00b0)
resp_utf8 = resp.body.encode 'utf-8' , 'ISO-8859-1'
some experiments below - only A & B interpret correctly but with assertion failures
char unicode_c_str = Client->GetUserChannelState(user_idx , channel_idx) ;
DBG("A=" + String( unicode_c_str)) ;
DBG("B=" + String( unicode_c_str).toUTF8()) ;
DBG("C=" + String::fromUTF8( unicode_c_str)) ;
DBG("D=" + CharPointer_UTF8( unicode_c_str)) ;
DBG("E=" + String(CharPointer_UTF8(unicode_c_str))) ;
DBG("F=" + String(CharPointer_UTF8(unicode_c_str)).toUTF8()) ;
/
DBG("G=" + CharPointer_UTF16( unicode_c_str)) ;
DBG("H=" + CharPointer_UTF32( unicode_c_str)) ;
/
DBG("byteOrderMark8=" +
String(CharPointer_UTF8:: isByteOrderMark( unicode_c_str))) ;
DBG("byteOrderMark2=" +
String(CharPointer_UTF8:: isByteOrderMark( unicode_c_str).toRawUTF8())) ;
DBG("byteOrderMark16BE=" +
String(CharPointer_UTF16::isByteOrderMarkBigEndian( unicode_c_str))) ;
DBG("byteOrderMark16LE=" +
String(CharPointer_UTF16::isByteOrderMarkLittleEndian(unicode_c_str))) ;
DBG("byteOrderMark8Valid=" +
String(CharPointer_UTF8:: isValidString( unicode_c_str , 1024))) ;
/
DBG("byteOrderMark16V=" +
String(CharPointer_UTF16::isValidString( unicode_c_str , 1024))) ;
DBG("byteOrderMark32V=" +
String(CharPointer_UTF32::isValidString( unicode_c_str , 1024))) ;
*/
NOTES:
- re: is_stereo - per NJClient this essentially equates to is_pannable
the semantics of this flag for LinJam is that this indicates its faux-stereo status
the actual client configuration is always stereo (pannable)
for faux-stereo pairs the stored value of pan is overridden to control both
- (pan < 0.0) => pairA = -1.0 , pairB = +1.0 + (pan * 2.0)
- (pan == 0.0) => pairA = -1.0 , pairB = +1.0
- (pan > 0.0) => pairA = -1.0 + (pan * 2.0) , pairB = +1.0
TODO: for remote channels the semantics of sink_n may need to be similarly overridden
- (gNinjam seems to only allow panning if sink_n == 0)