[Release] Alarm Clock

Discussion in '3DS - Homebrew Development and Emulators' started by 730, Sep 18, 2015.

  1. 730
    OP

    730 Professional Shitposter

    Member
    465
    376
    Apr 2, 2015
    Argentina
    Alarm Clock for 3DS
    NOTE: BROKEN IN 2.5.
    A lot of homebrew seems to have broken on 2.5, including lpp-3ds, and Rinnegatamante said he won't update it until the bugs are fixed, so... welp.
    Maybe I'll try and port this to C++ some day.


    UPDATE: lpp-3ds is being worked on to fix the bugs. I'll upload a new build when the problems are solved.

    I present you a revolutionary piece of homebrew, an Alarm Clock!!!
    If for some reason you don't have a phone or any other device with waking-up capabilities, you can use this thing!

    [​IMG]

    Controls
    A:
    Turn on the alarm using the selected alarm time/Select file on file explorer.
    B: Turn off the alarm and stop it if it's playing.
    Y: Open alarm explorer.
    X: Hide/show all UI elements (there's no way to turn off the screens as of yet); touching the screen will show the UI again too.
    D-Pad Up/Down: Change alarm hour/Scroll on file explorer.
    D-Pad Left/Right: Change alarm minutes.
    L/R: Change clock color.
    Select: Open background image explorer.
    Start: Quit.

    Alternatively, there's touchscreen controls for alarm-related features.

    Setup
    Put any WAV/OGGs you'd like to use on the "alarms" folder, located on the app's directory (as of 1.3.2 an alarm comes included).
    Put PNGs (I think JPG is supported too) to use as background images on the "backgrounds" folder, located on the app's directory (1.4+ only).

    Known Issues
    -Selecting an alarm on 1.4 (except for the initial selection) freezes the app.

    Changelog
    -1.4: You can now set a background image for the top screen. However, for some reason it crashes when selecting an alarm file (the initial alarm select still works though) since I added the background feature, so depending on your priorities you might want to use 1.3.2 until this problem is solved.
    -1.3.2: An alarm WAV now comes included. Updated lpp-3ds build.
    -1.3.1: Improved/fixed audio loading speeds, and large files don't crash the 3DS anymore (thanks @Rinnegatamante once again).
    -1.3: Added OGG support. Note that they take a long time to load (probably over 10 times the loading time of a WAV), so while it may seem crashed, it (most likely) isn't. I'm hoping to fix this in a future update.
    -1.2: An "alarm.wav" isn't needed anymore. On startup the file explorer opens up to select a WAV from the "alarms" folder. If there's only one, it doesn't open and instead that one is used. If there's none, you're prompted to exit.
    -1.1: Added support for selecting WAVs (thanks @Rinnegatamante for the script) and color switching for the clock on the top screen. Read Controls for instructions (note: an initial alarm.wav is still needed).
    -1.0.2: Fixed so you can ACTUALLY change the names to whatever the hell you want (thanks @ddraco).
    -1.0.1 (I guess?): Lets you change the name of the .3dsx and its directory to whatever the hell you want.

    TODO
    -Add sleep mode support and/or screen turn off when lpp-3ds R4 is finished.
    -Config file (for alarm file, clock color, background image, etc.).
    -Clean up code.
    Might consider:
    -Browse the whole SD instead of just one folder.
    -Show only the appropriate formats on the file explorers.

    Please post bugs, ideas, suggestions, etc.!

    1.3.2 Mirror
    1.4 Mirror

    Made with lpp-3ds
     

    Attached Files:

    Last edited by 730, Nov 14, 2015


  2. LinkSoraZelda

    LinkSoraZelda GBAtemp Advanced Maniac

    Member
    1,974
    617
    Aug 12, 2015
    United States
    Land of the Rising Orange
    Sad thing is that I actually don't have anything else and have dreamed for a 3DS clock for years now.
     
    jsa, lolzvid, Tomato Hentai and 2 others like this.
  3. Manito

    Manito GBAtemp Fan

    Member
    319
    138
    Dec 15, 2014
    United States
    Finally an alarm clock app for 3DS! Thanks!:bow:
     
    Subtle Demise likes this.
  4. rewrewrew123

    rewrewrew123 GBAtemp Regular

    Member
    265
    27
    Aug 20, 2014
    Italy
    Great! I will try it later!

    So try to implement the possibility to switch clock colors.
    (For example, at the moment there is set to white, try to implement something that change that white in red/blue/yellow etc etc for example.
    I suggest not so definite colors but "shady" because it will results better I think :D

    Another thing: try to put as alarm not only the file called "alarm" but it should be have a support of load any music file.
    For example if I have 5 audio files on my SD I should select what I prefer and not only alarm

    Anyway "as is" it is very minimalist and cool...maybe you can do two versions: one minimalist and one "rainbowed"
     
  5. LinkSoraZelda

    LinkSoraZelda GBAtemp Advanced Maniac

    Member
    1,974
    617
    Aug 12, 2015
    United States
    Land of the Rising Orange
    I can't open it. It shows Error: [string "?":35: bad argument #1 to 'pause' (number expected, got string) Press A to restart, Press B to exist, Press Y to enable FTP server--- FTP state OFF
    I named it right.
     
  6. ric.

    ric. Drivin' to meme country

    Member
    792
    907
    Sep 17, 2015
    Peru
    Pretty cool! I'll give it a go tonight.

    Is there a possibility to make this homebrew work when the system's closed? I just had an idea for an alarm clock app that works while the 3DS is closed, requiring you to open the system and solve a small puzzle before the alarm can be turned off, much like those Android alarm clock apps for heavy sleepers, but I don't know how complicated that'd be to implement.
     
  7. ddraco

    ddraco GBAtemp Regular

    Member
    104
    27
    Sep 12, 2015
    Gambia, The
    Rayono City
    Is this open source?
     
  8. 730
    OP

    730 Professional Shitposter

    Member
    465
    376
    Apr 2, 2015
    Argentina
    Sounds cool; I'll see what I can do.
    That is on my to-do list. Once I figure out how to make a file explorer I'll implement it. Maybe I can borrow some code from ORGANIZ3D...
    Sounds like there's no alarm.wav
    That's not possible without a kernel hack sadly. That puzzle thing sounds cool, albeit a bit complicated. Maybe I'll make it on a separate app.
    It's made with lpp-3ds so yes; open index.lua with a text editor.
     
  9. Bubsy Bobcat

    Bubsy Bobcat vegtebales

    Member
    1,471
    5,678
    Jul 8, 2015
    Zimbabwe
    Is it okay if I make a custom version of this (because I thought of a great idea for an alarm clock) and upload it please? I'll massively credit you, obviously!
     
  10. 730
    OP

    730 Professional Shitposter

    Member
    465
    376
    Apr 2, 2015
    Argentina
    Yup, sure.
     
    Bubsy Bobcat likes this.
  11. ddraco

    ddraco GBAtemp Regular

    Member
    104
    27
    Sep 12, 2015
    Gambia, The
    Rayono City
    Seen why it must placed in the folder 3ds/alarm-clock

    you can replace
    Code:
    alarm = Sound.openWav("/3ds/alarm-clock/alarm.wav")
    with
    Code:
    alarm = Sound.openWav(System.currentDirectory().."/alarm.wav")
    etc. so it can be placed in other folders then the hardcode "3ds/alarm-clock"
     
  12. LinkSoraZelda

    LinkSoraZelda GBAtemp Advanced Maniac

    Member
    1,974
    617
    Aug 12, 2015
    United States
    Land of the Rising Orange
    ...So what should I do?
    I had an alarm.wav, in the correct spot, like I said.
     
    Last edited by LinkSoraZelda, Sep 18, 2015
  13. 730
    OP

    730 Professional Shitposter

    Member
    465
    376
    Apr 2, 2015
    Argentina
    Haha thanks. Even then it still has to be on the app's directory...
     
  14. ddraco

    ddraco GBAtemp Regular

    Member
    104
    27
    Sep 12, 2015
    Gambia, The
    Rayono City
    because the 3dsx must name the same name as the folder in that is in

    — Posts automatically merged - Please don't double post! —

    Because the *.3dsx must have the same name than the folder
     
  15. 730
    OP

    730 Professional Shitposter

    Member
    465
    376
    Apr 2, 2015
    Argentina
    That's weird...
    I downloaded the zip, reinstalled it, and it works.
    Verify it's exactly sd:/3ds/alarm-clock/alarm.wav
     
  16. LinkSoraZelda

    LinkSoraZelda GBAtemp Advanced Maniac

    Member
    1,974
    617
    Aug 12, 2015
    United States
    Land of the Rising Orange
  17. Earth97

    Earth97 GBAtemp Regular

    Member
    274
    49
    Aug 18, 2015
    Italy
    Nice homebrew :D
    How could you avail of a kernel exploit to make the console turn on and play an alarm at a defined time? I recall it wasn't possible on DSLite with the built-in app. It would be nice if you could create a .cia containing an alarm clock with this feature for ninjhax 1.x.
     
  18. Tjessx

    Tjessx GBAtemp Maniac

    Member
    1,156
    508
    Dec 3, 2014
    Belgium
    I will try it tomorrow morning ;)
     
    730 likes this.
  19. 730
    OP

    730 Professional Shitposter

    Member
    465
    376
    Apr 2, 2015
    Argentina

    Attached Files:

    Last edited by 730, Sep 18, 2015
  20. ddraco

    ddraco GBAtemp Regular

    Member
    104
    27
    Sep 12, 2015
    Gambia, The
    Rayono City
    ma you corrected it not completly. you only changed one line. i mean all lines that has a folder path in it

    how i already seas you can replace

    Code:
     
    ("/3ds/alarm-clock/example)
    
    with
    Code:
    (system.currentDirectory().."/example")
    
    Code:
    "/3ds/alarm-clock"
     
    is
    Code:
    system.currentDirectory()..
    
    at your application ...