Skip to content

Commit

Permalink
Merge pull request #50 from silveur/develop
Browse files Browse the repository at this point in the history
V1.0.0 pre master
  • Loading branch information
silveur committed Jul 1, 2014
2 parents 1064fa8 + 9e5944a commit 7891df8
Show file tree
Hide file tree
Showing 42 changed files with 24,939 additions and 603 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*.out
*.app

.DS*
Builds/
JuceLibraryCode/JuceHeader.h
JuceLibraryCode/modules/*
Expand Down
Binary file added Designs/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Designs/IconSmall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21,221 changes: 21,221 additions & 0 deletions Designs/Sequencer.ai

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions JuceLibraryCode/AppConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,60 @@
//==============================================================================
// [BEGIN_USER_CODE_SECTION]

/* =====================================================================
* Steps - Midi sequencer
* Copyright (C) 2014 Silvere Letellier for Nummer Music
* Contact: <[email protected]>
-----------------------------------------------------------------------
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
===================================================================== */

enum StepStates
{
OFF,
ON,
JUMP
};

enum ClockMode
{
EXTERNAL,
INTERNAL
};

enum SequencerColours
{
COLOUR_1 = 0,
COLOUR_2,
COLOUR_3,
COLOUR_4,
COLOUR_5,
COLOUR_BACKGROUND
};

enum ColourTheme
{
DARK,
BRIGHT,
WINE,
ETSI
};

// [END_USER_CODE_SECTION]

//==============================================================================
Expand Down
367 changes: 357 additions & 10 deletions JuceLibraryCode/BinaryData.cpp

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions JuceLibraryCode/BinaryData.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@

namespace BinaryData
{
extern const char* button_minus_png;
const int button_minus_pngSize = 429;
extern const char* Icon_png;
const int Icon_pngSize = 21486;

extern const char* IconSmall_png;
const int IconSmall_pngSize = 4431;

// Points to the start of a list of resource names.
extern const char* namedResourceList[];

// Number of elements in the namedResourceList array.
const int namedResourceListSize = 1;
const int namedResourceListSize = 2;

// If you provide the name of one of the binary resource variables above, this function will
// return the corresponding data and its size (or a null pointer if the name isn't found).
Expand Down
17 changes: 17 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
* Steps - Midi sequencer>
* Copyright (C) 2014 Silvere Letellier for Nummer Music
* Contact: <[email protected]>

* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.

* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.

2 changes: 1 addition & 1 deletion Libraries/JUCE
Submodule JUCE updated from 343d68 to acebbf
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
Sequencer
Steps - Midi sequencer
=========

Supported platforms:

Sequencer
* Linux (coming soon)
* Mac OSX

## Initialising the repository
To compile you'll need the following dependencies:
* JUCE Framework
```
git clone [email protected]:silveur/Steps.git
git submodule init
git submodule update
```
It is also neccessary to generate the **Introjucer** application for creating the makefiles/build-projects for your target platform.
Binary file removed Ressource/button_minus.png
Binary file not shown.
107 changes: 107 additions & 0 deletions Source/AboutView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/* =====================================================================
* Steps - Midi sequencer
* Copyright (C) 2014 Silvere Letellier for Nummer Music
* Contact: <[email protected]>
-----------------------------------------------------------------------
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
===================================================================== */

#ifndef ABOUTVIEW_H_INCLUDED
#define ABOUTVIEW_H_INCLUDED

#include "../JuceLibraryCode/JuceHeader.h"
#include "ControllerView.h"

class AboutView: public Component
{
public:
AboutView()
{
theLogo = ImageFileFormat::loadFrom(BinaryData::IconSmall_png, BinaryData::IconSmall_pngSize);
addAndMakeVisible(theSlider = new Slider(""));
theSlider->setSliderStyle(Slider::RotaryVerticalDrag);
theSlider->setTextBoxStyle(Slider::NoTextBox, false, 50, 50);
theSlider->setTextBoxIsEditable(false);
theSlider->setScrollWheelEnabled(true);
theSlider->setColour(Slider::rotarySliderFillColourId, SeqLookAndFeel::getColour(COLOUR_1));
theSlider->setColour(Slider::rotarySliderOutlineColourId, SeqLookAndFeel::getColour(COLOUR_2));
theSlider->setDoubleClickReturnValue(true, 0);
theSlider->setRange(-12, 12);
theSlider->setValue(3);

addAndMakeVisible(theWebSite = new HyperlinkButton("http://www.nummermusic.com", URL("http://www.nummermusic.com")));
theWebSite->setFont(Font ("Helvetica Neue",13.0000f, Font::plain), false, Justification::left);
theWebSite->setColour(HyperlinkButton::textColourId, SeqLookAndFeel::getColour(COLOUR_1));
}

void paint(Graphics& g)
{
g.setFont (Font ("Helvetica Neue",13.0000f, Font::plain));
g.setColour(SeqLookAndFeel::getColour(COLOUR_1));

float heigthDiv = getHeight() / 16.0f;

g.drawText("Steps V" + String(ProjectInfo::versionString), getWidth() / 3, heigthDiv * 1, getWidth()/3 * 2, heigthDiv * 2, Justification::left, 2);
g.drawText("Programming: Silvere Letellier", getWidth() / 3, heigthDiv * 3, (getWidth()/3) * 2, heigthDiv * 2, Justification::left, 3);
g.drawText("With the help of: Danny White,", getWidth()/3, heigthDiv * 4, (getWidth()/3) * 2, heigthDiv * 2, Justification::left, 2);
g.drawText("Emmnanuel Corre, Julian Salaun,", getWidth()/3, heigthDiv * 5, (getWidth()/3) * 2, heigthDiv * 2, Justification::left, 2);
g.drawText("Guillaume De Oubeda", getWidth()/3, heigthDiv * 6, (getWidth()/3) * 2, heigthDiv * 2, Justification::left, 2);
g.drawText("Special thanks to Julian Storer", getWidth()/3, heigthDiv * 8, getWidth() / 2, heigthDiv * 2, Justification::left, 2);
g.drawText("Copyright 2014 Nummer Music", getWidth()/3, heigthDiv * 10, getWidth()/3 * 2, heigthDiv * 2, Justification::left, 2);
g.drawText("All rights reserved.", getWidth()/3, heigthDiv * 11, getWidth()/3 * 2, heigthDiv * 2, Justification::left, 2);

}

void resized()
{
float heigthDiv = getHeight() / 16.0f;
float widthDiv = getWidth() / 32.0f;
theSlider->setBounds(widthDiv, getHeight() / 2 - (getHeight()/4), getHeight()/2, getHeight()/2);
theWebSite->setBounds(getWidth() / 3, heigthDiv * 13, widthDiv * 20, heigthDiv * 2);
}


private:
ScopedPointer<Slider> theSlider;
Image theLogo;
ScopedPointer<HyperlinkButton> theWebSite;
};

class AboutWindow: public DocumentWindow
{
public:
AboutWindow():DocumentWindow("About",SeqLookAndFeel::getColour(SequencerColours::COLOUR_BACKGROUND), DocumentWindow::closeButton)
{
setUsingNativeTitleBar(true);
theAboutView = new AboutView();
theAboutView->setSize(200, 200);
setContentOwned(theAboutView, true);
}

void closeButtonPressed()
{
setVisible(false);
}

~AboutWindow(){}

private:
ScopedPointer<AboutView> theAboutView;
};

#endif // ABOUTVIEW_H_INCLUDED
45 changes: 45 additions & 0 deletions Source/ClockSource.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/* =====================================================================
* Steps - Midi sequencer
* Copyright (C) 2014 Silvere Letellier for Nummer Music
* Contact: <[email protected]>
-----------------------------------------------------------------------
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
===================================================================== */

#include "ClockSource.h"
#include "Master.h"

void ClockSource::run()
{
msg = MidiMessage::midiStart();
send();
while(!threadShouldExit())
{
msg = MidiMessage::midiClock();
send();
theStepTime = 1.0 / (theBPM / 15.0f);
wait(1000 * (theStepTime/6.0f));
}
msg = MidiMessage::midiStop();
send();
}

void ClockSource::send() const
{
theMaster->handleIncomingMidiMessage(nullptr, msg);
}
52 changes: 52 additions & 0 deletions Source/ClockSource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/* =====================================================================
* Steps - Midi sequencer
* Copyright (C) 2014 Silvere Letellier for Nummer Music
* Contact: <[email protected]>
-----------------------------------------------------------------------
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
===================================================================== */

#ifndef CLOCKSOURCE_H_INCLUDED
#define CLOCKSOURCE_H_INCLUDED

#include "../JuceLibraryCode/JuceHeader.h"

class Master;

class ClockSource: public Thread
{
public:
ClockSource(Master* master): Thread("ClockGenerator"), theMaster(master), theBPM(-1) {}

~ClockSource()
{
stopThread(200);
}

void run();
void send() const;

private:
Master* theMaster;
MidiMessage msg;
float theStepTime;
float theBPM;
friend class Master;
};

#endif // CLOCKSOURCE_H_INCLUDED
Loading

0 comments on commit 7891df8

Please sign in to comment.