Skip to content

Commit

Permalink
version 1.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fontainejp committed Mar 23, 2021
1 parent 993da2b commit 2ca9743
Show file tree
Hide file tree
Showing 64 changed files with 1,328 additions and 791 deletions.
8 changes: 0 additions & 8 deletions accueil.js

This file was deleted.

18 changes: 18 additions & 0 deletions compilation/arduino/libraries/midi/midi.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include "midi.h"

Midi::Midi(){}

void Midi::initialisation(){
Serial.begin(115200)//send velocity data
}

void Midi::send(byte command, byte MIDInote, byte MIDIvelocity){
Serial.write(command);//send note on or note off command
Serial.write(MIDInote);//send pitch data
Serial.write(MIDIvelocity)//send velocity data
}

void Midi::send(byte command, byte para){
Serial.write(command);//send note on or note off command
Serial.write(para);//send pitch data
}
12 changes: 12 additions & 0 deletions compilation/arduino/libraries/midi/midi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef midi_h
#define midi_h

class Midi {
public:
Midi();
void initialisation()
void send(byte command, byte MIDInote, byte MIDIvelocity);
void send(byte command, byte para);
};

#endif
File renamed without changes.
Binary file removed compilation/html/media/earth.jpg
Binary file not shown.
Binary file removed compilation/html/media/kv.mp3
Binary file not shown.
Binary file removed compilation/html/media/lamadrama.mp4
Binary file not shown.
Binary file removed compilation/html/media/vexento.mp3
Binary file not shown.
Binary file added compilation/midi/hairless.exe
Binary file not shown.
31 changes: 31 additions & 0 deletions compilation/midi/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Hairless MIDI <-> Serial Bridge is the easiest way to connect serial devices (like Arduinos) to send and receive MIDI signals.

The project home page is http://projectgus.github.com/hairless-midiserial/

Please see that page for information on running and using Hairless Midiserial, and downloadable compiled versions for Windows, OS X and Linux.

# Building Hairless Bridge from source

(Note again, prebuilt versions *are available for download* at the above URL.)

Hairless uses git submodules for library dependencies, so you should use `git clone --recursive URL` when cloning from Github. Alternatively, you can run `git submodule update --init` in order to fetch the submodules to an already-cloned directory.

Hairless Midiserial Bridge release 0.4 was built with Qt 4.7.3. It's also been built and run under Qt 4.7.4 & 4.8.6. Newer Qt version 5.0 will probably require code changes in order to compile and/or run.

The Qt package should contain all dependencies, the graphical IDE "Qt Creator" or the program "qmake" can be used to compile the project hairless-midiserial.pro.

On Windows I recommend building with the [MingGW compiler](http://www.mingw.org/), Visual Studio has not been tested. Neither the MinGW site nor Qt's new owners Digia still distribute older MinGW builds, and MinGW 4.7 is too new for precompiled Qt 4.7.x, so it can be a bit hard to find a prebuilt combination that work. Recently I downloaded `mingw-static-4.4.5-all.7z` from [this Google Code project](https://code.google.com/p/qp-gcc/downloads/list), and can confirm that works.

(For the Windows release builds I actually [cross-build under Linux using wine, as described here](http://projectgus.com/2011/09/developing-qt-apps-for-windows-using-linux-wine/).)

# Libraries

* [qextserialport](https://code.google.com/p/qextserialport/) is hosted on Github and is linked into the source tree as a git submodule.

* [The RtMidi library](https://github.com/thestk/rtmidi) is hosted on Github and is linked into the source tree as a git submodule.

Both libraries are small so they compiled as source files directly into Hairless Bridge, not linked as libraries.

# Release builds

The official releases are static linked, so they've actually been built against Qt versions that were compiled from source, configured with `-static` for static linking.
19 changes: 15 additions & 4 deletions electronApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,20 +201,20 @@ ipcMain.on('save-bloc', function(event) {
event.sender.send('saved-bloc', filename)
})
})
ipcMain.on('save-html', function(event) {
ipcMain.on('save-html', function(event, nameFile) {
dialog.showSaveDialog(htmlWindow,{
title: 'Enregistrer au format .html',
defaultPath: 'pageWeb.html',
defaultPath: nameFile+'.html',
filters: [{ name: 'Web', extensions: ['html'] }]
},
function(filename){
event.sender.send('saved-html', filename)
})
})
ipcMain.on('save-www', function(event) {
ipcMain.on('save-www', function(event, nameFile) {
dialog.showSaveDialog(htmlWindow,{
title: 'Enregistrer au format .www',
defaultPath: 'pageWeb.www',
defaultPath: nameFile+'.www',
filters: [{ name: 'Blockly-Web', extensions: ['www'] }]
},
function(filename){
Expand Down Expand Up @@ -263,6 +263,17 @@ ipcMain.on('addImg', function(event) {
event.sender.send('added-img', filename)
})
})
ipcMain.on('addLIB', function(event) {
dialog.showOpenDialog(mainWindow,{
title: 'Ajouter des bibliothèques',
buttonLabel: "Ajouter",
filters: [{ name: 'Archives', extensions: ['zip']}],
properties: ['openFile', 'multiSelections']
},
function(filename){
event.sender.send('addedLIB', filename)
})
})
ipcMain.on('openBF', function(event) {
dialog.showOpenDialog(factoryWindow,{
title: 'Ouvrir',
Expand Down
19 changes: 8 additions & 11 deletions factory.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
var remote = require('electron').remote
var { ipcRenderer } = require("electron")
var fs = require('fs')
var chemin = process.resourcesPath
var messageDiv = document.getElementById('messageDIV')
var appendData = ""
var place
var chemin = process.resourcesPath // .../resources/

function loadBF(file) {
$.get(file, function(data){
Expand All @@ -29,15 +26,15 @@ window.addEventListener('load', function load(event){
$('#btn_max').on('click', function(){
if(window.isMaximized()){
window.unmaximize()
document.getElementById('btn_max').innerHTML="<span class='fa fa-window-maximize fa-lg'></span>"
$('#btn_max').html("<span class='fa fa-window-maximize fa-lg'></span>")
}else{
window.maximize()
document.getElementById('btn_max').innerHTML="<span class='fa fa-window-restore fa-lg'></span>"
$('#btn_max').html("<span class='fa fa-window-restore fa-lg'></span>")
}
})
$('#btn_append').on('click', function(){
$("#message").modal("show")
messageDiv.innerHTML = ""
$('#messageDiv').html("")
var i = 0
var cat = localStorage.getItem("toolboxids").split(",")
var selectTool = document.createElement("select")
Expand All @@ -50,21 +47,21 @@ window.addEventListener('load', function load(event){
opt.innerHTML = Blockly.Msg[cat[i]]
selectTool.appendChild(opt)
}
messageDiv.appendChild(selectTool)
document.getElementById('messageDIV').appendChild(selectTool)
})
$('#btn_appendOK').on('click', function(){
if ($("#toolchoice").val()) {
var dataB = document.getElementById('languagePre').textContent
var dataB = $('#languagePre').text()
var dataG = editor.getValue()
var xml = Blockly.Xml.workspaceToDom(mainWorkspace)
var new_element = document.createElement("language")
new_element.appendChild(document.createTextNode(dataG))
xml.insertBefore(new_element, xml.childNodes[0])
var dataX = Blockly.Xml.domToPrettyText(xml)
fs.writeFileSync(chemin+'/../www/blocs&generateurs/factory/' +blockType+ '.bf', dataX)
appendData = dataB + "\n" + dataG + "\n////////////////////\n"
var appendData = dataB + "\n" + dataG + "\n////////////////////\n"
fs.appendFileSync(chemin+'/../www/blocs&generateurs/factory/append.js', appendData)
place = $("#toolchoice").val()
var place = $("#toolchoice").val()
ipcRenderer.send("appendBlock", blockType, appendData, place[0])
window.close()
} else $("#message").modal("hide")
Expand Down
Loading

0 comments on commit 2ca9743

Please sign in to comment.